So a flush with (A 3) T 9 8 would beat a flush with (K Q) T 9 8 - even if the sum is higher on the second. In your example however, the sum is.
What beats what in Poker - a Full House or Four of a kind? Poker hand The highest of all Poker hands, a Royal Flush is 10, J, Q, K, A of the same suit.
Poker hands: check out what beats what in Texas hold'em with our poker hand Any hand that that has five cards of the same suit is a flush. What Beats What in Poker Hands