Purely mechanically. Just writing down the problem statement we get:
\exists f,g: \forall a,b: (f(b)=a) | (g(a)=b)
where f,g are the guesses and a,b are the flips. Each guess is a function of the information available to the respective player -- the outcome of his own coin flip. There's only 4 unary boolean functions: f,g \in {true,false,id,not}
The constant functions are out and order doesn't matter, so we're left with {(id,not),(id,id),(not,not)}
Here I just tried (id,not) first, but 3 choices are easy to check exhaustively.