This whole situation revolves around whether the player making the initial raise is tight or loose with his PFR. If he has a wide opening range from that position, 3bet lighter as you did. Obviously if he's tight you'll have to stick with the depolarized 3bet range QQ+ AK. You should also consider his fold to 3bet frequency. With slightly less than 7bbs left against a player with slightly less than 43bbs AQ looks pretty good. You are in the orange zone against a green zone player. You should be playing aggressively and 3bet/shoving ~3x the original raise with AQ looks like a good spot to me as long as this player is not very tight in this position.

Unfortunately you ran into a very strong hand and then he hit the flop to take it away again. You almost got away with it.