Starting from a normal hash function of $n$ bits $h:\{0,1\}^*\to\{0,1\}^n$, define
$$h(a,b)=h(\;\min(h(a),h(b))\;\|\;\max(h(a),h(b))\;)$$
where $\|$ denotes concatenation of bitstrings, and order of bitstrings for $\min$ and $\max$ is lexicographic.
Trivially, $h(a,b)=h(b,a)$. First premimage resistance is kept. Other security properties (collision resistance, second preimage resistance, security in the Random Oracle Model) need adaptations, but follow from that of the one-argument $h$.
For some uses (including some Proof of Work protocols; see this for more), as well as making proofs stronger/easier, we might need a different inner and outer hash; like
$$h(a,b)=h(\;\;\text{‘1’}\;\|\;\min(h(\text{‘0’}\|a),h(\text{‘0’}\|b))\;\|\;\max(h(\text{‘0’}\|a),h(\text{‘0’}\|b))\;)$$