Solution (source code)

= Solution

The <Cauchy-Riemann equations> give $v_x=2x$, $v_y=2-2y$. Integrating and matching both derivatives gives the <harmonic conjugate>
$$
\boxed{v=x^2+2y-y^2+C,\qquad f(z)=2z+iz^2+iC,\quad C\in\mathbb R.}
$$
The real part of this polynomial is exactly the required $2x(1-y)$.