You could arrange for an early election by the House of Representatives, with the assistance of the Senate.
1) House impeaches Prez and VP
3)New speaker is elected with intention of them becoming Prez (doesn’t have to be a member of the House)
4)Senate finds Prez and VP guilty of impeachable offenses (2/3 vote)
5)New speaker who was intended to become Prez, becomes Prez
6)Original speaker can be elected again as Speaker of House
7)Prez with congress’ approval selects new VP