For the Presidency ? Whomever would be the highest duly-elected officeholder as of January 20th. The Speaker of the House would be acting President in this instance.
However, this is something I’d see more likely as happening in a Governor’s race if anything, with either the Lt Governor/Sec of State/Atty Gen or legislative leader serving in an acting capacity.
When they had a situation in Minnesota in 1963 with a hung election between incumbent leftist RINO Gov. Elmer L. Andersen and Democrat Lt. Gov. Karl Rolvaag, Andersen remained a few months past the end of his term after the election was certified (he lost by 91 votes).
I think the Speaker should be removed from the line of succession, the provision allowing them to become acting President after resigning from Congress is just bizarre.
It makes constitutional sense to have the Pres Pro Tem there but practically speaking, who wants some 85 year Senator in charge? I tend to think the Sec of State should be # 2 behind the VP.