Didn't you had geography at school? Or just look at any map of the world and you can see that the only way from the UAE to Qatar is through Saudi.
Yes, you need a transit visa for Saudi which you can get in 3 working days.