The child will likely have a problem under this scenario. Very simply the immigrant visa must be available to be issued to the family before the son turns 21 (minus the time it took to adjudicate the I-526 petition).
However, the child status protection act (CSPA) can provide some relief for children who would have maintained eligibility but for the time USCIS took to adjudicate the immigrant visa petition. This relief takes the form of subtracting the time the petition was pending from the child’s age; this is the child’s “CSPA age.”
Provided that the child’s CSPA age is under 21 at the time the immigrant visa is issued to the principal, the child will be eligible to receive a visa based on age, even if the child’s real age has reached 21.
So, assuming the I-526 takes 14 months to adjudicate, the son won’t ‘age’ during that period. When the green card (either AOS or consular processing) is approved, the son will be his actual age minus the 14 months, if that puts him over 21, which will be likely, then he will not be eligible.