Solution (source code)

= Solution

Set
$$
h=\frac{x+x^*}{2},\qquad
k=\frac{x-x^*}{2i}.
$$
Both are hermitian and $x=h+ik$. If also $x=h'+ik'$ with hermitian $h',k'$, taking adjoints and then adding or subtracting the two equations gives $h=h'$ and $k=k'$.