The president's position is not affected if the speaker dies.
If the House eaker dies, a new speaker is elected by the House.
Speaker of the House?
george
speaker of the house
If both die then the Speaker of the House becomes president
speaker of the house
President pro tempore of the Senate becomes President.
vice president, & if he dies, the speaker of the house
The Presidency goes to the Vice President. If the VP dies, Presidency passes to the Speaker of the House.
The Speaker becomes president.
Next in line after the VP is the Speaker of the House.
If both of them die, the speaker of the house becomes the president.