you can choose to restore from the older phone when you connect your iphone5 by cable and start itunes on the computer and navigate to the iphone and click the restore buttom then you can choose the iphone3's backup
or you can google
iphone backup restore sms
there are many third party programs which let you backup and restore sms's from iphones