I’ve seen this meme or ones like it recently, and it’s quite misleading.
Someone has taken the line of succession (Vice President, Speaker of the House, Senate President, Secretary of State, etc.) and somehow has forgotten that holes can be filled in the meantime.
If Trump is impeached (Sorry — when Trump is impeached), then Pence becomes President. He then names a new Vice President (approved by the Senate). If he names John McCain, then McCain becomes Vice President. And then if Pence is impeached, McCain becomes President, not Paul Ryan.
That’s what happened with Nixon. His Vice President Spiro Agnew resigned because he was a bigger crook than Nixon, and Nixon named Gerald Ford. Then Nixon resigned and Ford became President, and he named Nelson Rockefeller as his Vice President. We didn’t even need the line of succession law.
The only way this line of succession is important is if everyone was impeached at the same time. The reason we even have such a law about the line of succession is for the unlikely situation where there may be a terrorist attack or something and suddenly a bunch of these people die at once. We then go down that line to see who is next.