How to install an app on iPhone from a second machine? I actually took many hours this morning to find out how to do it, but I want to see alternatives to it.

I got my iPhone in sync with my iTunes at home, my first machine. I could "just" bring the app folder/file back home and sync through that. It works just fine.

The question here is on alternatives to that. Jailbreak or not, how could we do it on a second machine?

edit: I mean to install an actual file like application.app or application.ipa just like they are on the Mobile Applications folder or on iPhone's own /Applications one.
For most users, the headache free method is preserving the iTunes folder in its entirety and bringing it over to the other computer. You would then sign into the account you obtain the app with on that computer, and authorize it.

If you're simply without the first computer and want to get the app back, then you would simply re-download from the App Store for free (assuming it hasn't been removed).