Generally A9 wants to check a flop like 844 rainbow, because you are likely ahead of you opponent's range, but you don't want o play a massive pot. If you bet you can get bluff raised easily and you would have to fold. Basically, betting in this spot will cause you to be c-betting too much an dwill allow your opponent to outplay you.
He does bet, however and this is a mistake you want to capitalize on. Your strategy will likely be to raise most of your fours and full houses. Not all of them, since your calling range will be too weak, but most of them. And you will be balancing this out with a little too many bluffs, since he is c-betting too much. Good bluff candidates would be hands like 65s, 76s, 75s, 97s, T9s etc. with the backdoor flush draw. These hands are better than QTo, since they have worse showdown value, but better equity against your opponent's value range due to more backdoor straight/flush possibilities. Adding QTo to your bluffing range will cause you to be way overbluffing in this situation. There are so many better hands to bluff with!
Now he re-raises your raise. This is a bad play. You are representing a very strong hand (you also have more strong hands in your range than him) or a bluff. Obviously you will usually fold you all your bluffs to a raise :P and only continue with value. So, his re-raise is bad and is not really representing anything except A4 or 8s. What I would advise in this spot is to call with your entire range. Same thing, if you would re-raise, he is supposed to fold his bluffs and call with his value.
And same thing, you are never supposed to raise again, because he will fold his bluffs he isn't even supposed to have and call with value. And if you really want to have a raise range in this spot, which I strongly advise against, you should be even more selective with bluffs than before. QTo is not a good candidate to bluff with.
These hands are very weird, but you will be playing against crazy players a lot. Your play was crazy as well. Don't blame the 'bad players', but try to be a better player yourself. I hate to say it, but if you play QTo this way, you are overbluffing in this spot, making A9o probably a profitable call in a 4-bet pot on 844 rainbow.
Make a note and remember this player. You can capitalize on these kinds of players, but not with this strategy.
So to conclude. I would prefer a fold on the flop, at any point in the hand.