2. We use the complex variable $w\colon=x+iy$ and Wirtinger derivatives: $\pa_w=(\pa_x-i\pa_y)/2$, $\pa_{\bar w}=(\pa_x+i\pa_y)/2$. Then $\pa_x^2+\pa_y^2=4\pa_w\pa_{\bar w}$ and thus $$ \D P =4\pa_w\pa_{\bar w}P+\pa_z^2P =4nw^{n-1}m\bar w^{m-1}z^k+k(k-1)w^n\bar w^m =w^{n-1}\bar w^{m-1}z^{k-2}(4nm|w|^2+k(k-1)z^2) $$ Therefore $P$ is harmonic if $k\in\{0,1\}$ and $nm=0$.