You should attach the account that was previously used on the old phone and the Backup and Restore function should be activated as well. Alternatively, access Play Store and search for the application, then you can install it. It's also possible to transfer the APK file on the SD card and then you can install it this way.
If you can't find the application on Play Store, then you can use Amazon App Store to install the application.