Stephen A Douglas first ran for the House (but lost) when he was not yet 25.
Again, I believe if he had won the House of Representatives would have refused to seat him and would have declared a vacancy. There would have been a special election. Now if he was only a few days from turning 25 at the time the new House was being sworn in, I don't really know what would happen. I don't know if there is any leeway to delay swearing in a member or not and if so how long that may be. A good question.
There actually were several cases of ineligible US Representatives being elected, one hadn't been a citizen long enough (by a few months) while the other
was underage (24). When the Representatives-elect passed that threshold, one passed the 7 year mark of citizenship, the other turned 25, they were both
seated. If the precedent holds, the House could determine that the "the Kid" becomes president on his 35th birthday.
These precedents are included in the House rules and are on that website.