That is his money, not theirs. He doesn't need to pay it back to demand changes to the agreement (equity or otherwise). And he gets nothing if he gives it back.
Since he did the work for hire the IP rights belong to the partner, not to him. At least, he doesn't have the ability to win a court case there due to the mismatch in legal representation.
Again, do not let the dad write even one word of the contract. Signing the dad's contract will be way worse than walking away from the project.
It's not at all clear that this is a work for hire, in the absence of a contract-- he's not an employee, and the relationship is vague. I recommended paying back the money paid so far, so as to defuse any potential "work for hire" claims.
This is perfectly clear from a legal perspective: the programmer guy (the OP) owns all the IP that he created. Don't pay the money back, just keep going.
It looks like "a work specially ordered or commissioned for use as a contribution to a collective work" to me. But, again, I agree that he should keep whatever money he has earned.
Software actually does not fall into that category. What that category means is "magazine article." If you go further down in the page, you'll also note that one of the other stipulations is that there is an explicit written contract stating that is a work for hire.
this page probably explains the situation better than my random comments:
Since he did the work for hire the IP rights belong to the partner, not to him. At least, he doesn't have the ability to win a court case there due to the mismatch in legal representation.
Again, do not let the dad write even one word of the contract. Signing the dad's contract will be way worse than walking away from the project.