Pair ranks are compared before the side card in the usual example. A table can use a different rule after an exact tie; do not assume suits have a fixed order unless that variant says so.
Practice example: use the side card only under the tie rule
Compare Q♣ Q♦ 2♥ with J♣ J♠ A♦. Then reset the second hand to Q♠ Q♥ A♦. Check the pair rank before looking at the third card in both comparisons.
The queens beat the jacks even against an ace side card. With two pairs of queens, the ace can decide if the table uses the unpaired card to settle equal pairs. Read the tie rule rather than assuming that it applies in every variant.