First hand: pretty reasonable play. I would not have raised after the river unless I had a monster hand. The $50 raise wouldn’t have made anyone fold, and left you vulnerable to a big reraise, and left you in a difficult spot to call, when you have a top pair with a weak kicker.
Second hand... I think you made a reasonable play pre-flop (but others might beg to differ) in wanting to face off one on one against the short stacked guy... especially since you weren’t in good position and hoping that raiser folds. He could have raised with large variety of hands. You were horribly unlucky that the dude completed a set on the flop. Even if you simply called the pre-flop raise... if the raiser calls too, you would have lost your chips after the flop anyway (assuming you bet or even if you check and he bets).
I hate getting decent cards in the blinds or even early position. And QQs are my nightmare cards. Any overcard on the flop puts me in a difficult decision. Tough luck.