Since the first time Tormund saw Brienne, he wanted to bed her. On a side note, it is overplayed for laughs, which contributes to turn Tormund into a pure comic relief character. It's a bit dumb and lame, even if the comedy is often effective. Anyway, what matters here for our discussion is Jaime's (re)actions when faced with Tormund's obvious infatuation with Brienne: It shows how he feels about her. It's a classic "two boys in love with the same girl" situation. That's what Tormund has to do with Jaime's relationship with Brienne. That being said, you really need to never have seen a romantic comedy in your life to not realize that the odd couple with a lot in common and who argue with each other all the time will fall in love at some point in the story (or are in love but don't realize it, or are in love but think the other is not, etc, etc, etc).