how do you do that on his and my playstation?
Well were you logged in under your PSN ID on his PS3 or your friends, if it was theirs then that's why, however if it was your own then after you beat the game you should have synced the trophy information, then once you got home done the same on your PS3.
Customer Service Available Mon-Fri 8am - 8pm
General Enquires - 1-800-345-SONY (7669)
Account & Billing Support -1-877-971-SONY (7669)
Live Chat Available Mon-Sat 6am-10pm PST & Sun 6am-8pm - LiveChat