I have a question about 1 Timothy 2:1 - "I urge, then, first of all, that petitions, prayers, intercession and thanksgiving be made for all people."

Does this mean that we are to give thanks for all people or on behalf of all people? (Greek "hyper")

For example: I'm riding on the bus. Does Paul mean that I should give thanks to God that the driver drives carefully, or that salvation and blessing are given to the driver also? I couldn't discern from the text. The first example is giving thanks for what benefits me, the second for the benefit of the driver.

I think the term is broad. We pray for their welfare; for them to be open to God; that God will accomplish his will through them; and so on.

I would not limit it to one particular thing. Certainly to the extent that God is blessing us through our leaders, we ought to be grateful. At the same time, we know that he can also refine us through bad leaders.  Sometimes, especially because a leader is unrighteous, we have a unique chance to grow, to be like Christ (1 Peter 2:21-25).