Professor at MIT can read minds!
JavaScript (ES6), 130 102 bytes
Takes input as an array of strings in &quot;Rs&quot; format, where R is the rank and s is the suit. Expects &quot;T&quot; for 10's. Aces are low.
a=&gt;(s='A23456789TJQK')[([[R,[,S]],B,C,D]=a.map(c=&gt;[s.search(c[0])+14,c]),R+=D&lt;C|2*((D&lt;B)+(C&lt;B)))%13]+S

Try it online!
How?
We first convert each card into an array [rank, card] where rank is a numeric value in [14...26] and card is the original string.
[[R, [, S]], B, C, D] = a.map(c =&gt; ['A23456789TJQK'.search(c[0]) + 14, c])

The rank and suit of the first card are stored in R and S respectively. The three other cards are stored in B, C and D.
For instance, ['3c','6h','6c','2s'] becomes:
[ [ 16, '3c' ], [ 19, '6h' ], [ 19, '6c' ], [ 15, '2s' ] ]
    ^^    ^     &lt;----------&gt;  &lt;----------&gt;  &lt;----------&gt;
    R     S          B             C             D

We then compare each pair in [ B, C, D ]. These elements are implicitly coerced to strings when they are compared with each other:
[ 19, '6h' ] --&gt; '19,6h'

Because both rank and card are guaranteed to consist of exactly two characters, it is safe to compare in lexicographical order.
We compute:
(D &lt; C) | 2 * ((D &lt; B) + (C &lt; B))

Below are all the possible combinations:
 B, C, D | v0 = D &lt; B  | v1 = C &lt; B  | v2 = D &lt; C  | v2|2*(v0+v1)
---------+-------------+-------------+-------------+--------------
 S, M, L |    false    |    false    |    false    |      0
 S, L, M |    false    |    false    |    true     |      1
 M, S, L |    false    |    true     |    false    |      2
 M, L, S |    true     |    false    |    true     |      3
 L, S, M |    true     |    true     |    false    |      4
 L, M, S |    true     |    true     |    true     |      5

Finally, we build the output card using R, S and the above result:
'A23456789TJQK'[(R += D &lt; C | 2 * ((D &lt; B) + (C &lt; B))) % 13] + S