A small crack in the foundation and movement of 7 1/2 inches are two very different things. If a wall was that far out of line it should have been noticed by someone. If you used a Realtor I would think they would have noticed it also. Here are your options.
1. New York has a property condition disclosure law. It doesn't have a lot of teeth, but it requires the seller of a property to give you a property condition disclosure report on the house or a $500 credit at the closing. If neither happened, you can have your lawyer try and rescind the sale or get money to fix it. Please keep in mind if the owner did not occupy the property prior to sale there may not be much in the report. An estate would be an example of this.
2. If the owner and/or agent knew about the defect and didn't disclose it, you could seek to recover your loss through the courts or possibly through your local real estate board if there was a violation of the Realtor Code of Ethics.
3. Go after the inspector. Their inspection reports have more disclaimers then anyone, but just because the claim they may be stupid and ignorant doesn't mean you can't sue them. Don't take this as trashing home inspectors. I know a number of very good ones. I don't think a good inspector would have missed a 7 1/2 inch move in a wall.
Good luck. You shouldn't be stuck with an expensive repair like that. I hate to say it, but I hear this more often when people have bought a home for sale by owner. Frequently a Realtor will notice a problem like this and discuss it with the homeowner. If the homeowner doesn't want to disclose or address the problem they end up trying to sell without a Realtor.