Jail the mother. She's not going to care for that child anyway, to her it's a meal ticket.
Put the baby in the foster care system.
Have the father pay child support to the government, which will in turn make sure the money is being used for the kid's care and nothing else.
Yes the guy still gets the raw end of the deal, but at least his money isn't going to some conniving gold digger... If he decides he wants the child (he could change his mind) then he can obtain full custody, pending a time of observation by child services.
But the criminal that decided to use a baby for profit? she should never have more than minor visitation rights.
Edit to amend: The father should pay support as long as the child is under the care of child services, but if and when the kid is fully adopted by another family, then he should no longer be responsible. This would also help alleviate some the hardships of childless couples looking to adopt and having to look overseas for a chance to adopt an infant.