Raw Input
john acct 33425 NewYork
mary sale 184523 Taipei
kelly mis 4538 HongKong 
Desired Output
john acct 0033425 NewYork
mary sale 0184523 Taipei
kelly mis 0004538 HongKong 
Script and Comments
Script1
[ 1] s/[^ ][^ ]*/\n000000&/3
[ 2] s/\n[^ ]*\([^ ]\{7\}\)/\1/
Comments
  1. Step [1] will add a new line character and 6 zeros to the left of the third field. The new line character is used to facilitate finding this field in further steps.
  2. Step [2] will keep 7 rightmost and trim other characters of the third field.