Hello!
First of all, we either raise or fold after 1 limper, and in this case we of course raise and then call a 3-bet since the hand is to weak to cap it. I think that then we can also just c/f the flop because we don't beat enough hands that 3-bet us preflop and we only have 2 backdoor draws which aren't strong and additional outs for a set which gives AQ a straight though so it's not clean either. It's also a 3-way pot and I just don't see you ahead often enough to make a profitable calldown. Alright now we go to your line... on the flop we again have now an even easier check/fold as we only beat AQ from the standard cappinh range and not call flop and turn, and if you think that by donk betting river when a couple of deuces showed up and you called a preflop cap is going to throw a better hand out, well, it won't ;). And again it is a 3-way pot and your chances of winning it with a bluff are slim. As for the bad beat, there is no bad beat here.
I suggest following the starting hand charts, reading some articles, attending some coachings, watching some videos and posting hands in the hand evaluation section in order to improve your game :). And don't forget about bankroll management, it really is important!
Regards,
Primzi