FS Beretta Mix 22 pocket gun

I just tried to purchase another firearm from a friend a couple weeks ago. You both must have Id’s to the state that the firearm is registered. Thats what I was told. This was from Ohio to Pa and Im almost positive this applys to all states.