You can purchase visas on arrival at the airport but I believe you can only do so using a credit card.
For both your stops, you might want to consider
Al Maha meet and greet.
Which hotel are you staying in in DOH? It is a very short trip from the Arrivals terminal to the Marriott and they have a great, deep pool there and an excellent although expensive steakhouse. In fact I have just returned from today's swim there.