I don't like the preflop call. Yeah, we're deep, and while it's OK to play some speculative hands deep, Q9s is not really one of them. Suited aces would have been different, because at least then we can feel certain that we have the nuts when we hit a flush on a non-paired board. Or, differently put: We're hoping to be paid off with a speculative hand and we think the $576 left in the effective stack will be enough implied odds
. But there's no way our implied odds are that great because we're very rarely going to get paid off on a flushy board with the third nut flush by something worse.
I don't like peeling the flop. I could see an argument for it if the intention is to take it away from him on the turn, but we apparently decide to forfeit that chance when we get there. With the description given of villain I don't like raising the flop either because apparently it won't work very often. So I fold the flop. We took a chance with a speculative hand, we missed, we move on.
I really don't like check/calling the turn. And while I think check/raising the turn shows a profit, my preferred line by far is to bet the turn with the intention of shoving if we get raised. That's assuming I somehow get to the turn.
On the river, there's certainly nothing wrong with folding. Would shoving show a profit? Maybe. Except we're not representing much. Did we get it to the river with a flopped set? That's just 7 combos. What else could we possibly have that makes sense? His value range is much (much, much) wider than our value checkraising range here. He can have aces, kings, AK (probably KQ as well depending on our own image) and any set. If we're going to jam here, we're down to pretending we slowplayed a set. We can't represent KQ or KJs or something like that because that would normally be a bluffcatcher, not a river raise.
But I don't know how wide his river betting range is. And I don't know how compulsively your friend slowplays, so perhaps there could be monsters in his range that I'm not thinking of (AA,KK for instance).
In summary: Playing 300 deep OOP sucks. Avoid it if you can. And here, I think your friend had a lot of opportunities to avoid it.