I think Speaker is 4th in line. President Pro Tempore of the Senate is 3rd.
Order is VP, Speaker of he House, President Pro Temp of Senate, then Secretary of State, Sec Treasury, Sec Defense, .....AG and on and on.
The Speaker comes before the Senator Pro Teum
From WikiPedia:
The succession follows the order of vice president, Speaker of the House of Representatives, President pro tempore of the Senate, and then the heads of federal executive departments who form the Cabinet of the United States-Secretary of State, Sect. of Treasury, Sect. of defense are the first 3.
https://en.wikipedia.org/wiki/United_States_presidential_line_of_succession
Speaker is 3rd.
In case someone hasn’t told you yet, The succession follows the order of vice president, Speaker of the House of Representatives, President pro tempore of the Senate, and then the heads of federal executive departments who form the Cabinet of the United States.