Let assume it is already known that:
If $H$ is an inner product space and $\varnothing \neq A \subset H$ is a complete convex subset, then there exists a unique vector $P_A f:=g\in A$ with $\|f-g\| = d(f,A): = \inf\{\,\|f-h\|\, : h\in A\}.$
Then I want to prove the following statements are equivalent:
i) $g = P_A f$
ii) $g\in A$ and $\operatorname{Re}\langle f-g,h-g \rangle \leq0, \ \forall f\in A .$
(ii) to (i): know $$\|f-h\|^2 = \|f-g+g-h\|^2 = \|f-g\|^2+\|g-h\|^2+2\operatorname{Re}\langle f-g,g-h\rangle,$$ so $$\|f-g\|^2\leq\|f-h\|^2, \ \forall h\in A.$$
How to prove that (i) implies (ii)?
Assume that $\mathrm{Re}\langle f-g, h-g\rangle > 0$ for some vector $h\in A$ (I'm assuming you meant $\forall h\in A$ in your (ii)). Then you show that $h$ is closer to $f$ than $g$ is, for instance using the polarization identity $$ \|x\|^2 - \|y\|^2 = \mathrm{Re}\langle x+y, x-y\rangle.$$