iPad, iphone linking and usage
Any app belongs to the Apple ID that purchased it.
You cannot transfer it to another account. 

You could download it to another device only by logging in with the Apple ID that made the original purchase.

You do this by going to Settings ➔ iTunes &amp; App Store then tap on Apple ID, then tap Sign Out (of whoever is signed in) Then sign in with your Apple ID.

Everything you've bought with that Apple ID (music, movies, apps) can be downloaded to that device.

If you used someone else's device to purchase an app using your own credentials, it would still be available for later download to your phone - though it would, of course, still be on the other person's device unless you deleted it afterwards. You can't remotely delete content from a device.

You can install apps on up to five iOS devices concurrently.

It goes without saying that letting someone else know your Apple ID login details could be potentially very unsafe.