Find all relevant partial derivatives to show the expression is true

Let $$z = f(x, y)$$ be a function with continuous partial derivatives. Let $$x = e^r\cos(\theta)$$ and $$y = e^r\sin(\theta)$$. By finding all relevant partial derivatives and using the chain rule, show that $$\left(\frac{\partial z}{\partial x}\right)^2+\left(\frac{\partial z}{\partial y}\right)^2=e^{-2r}\left[\left(\frac{\partial z}{\partial r}\right)^2+\left(\frac{\partial z}{\partial \theta}\right)^2\right]$$ First I found the $$\frac{\partial z}{\partial x}$$ and $$\frac{\partial z}{\partial y}$$, which I took to mean that I needed to to find $$\frac{dz}{dr}+\frac{dr}{d\theta}$$ because of the chain rule, so I got: $$\frac{dx}{dr}+\frac{dx}{d\theta}=e^r \cos(\theta)-e^r \sin(\theta)$$ $$\frac{dy}{dr}+\frac{dy}{d\theta}=e^r \sin(\theta)+e^r \cos(\theta)$$ Then after squaring both equations I got $$2e^{2r}$$, but how do I find the partial with respect to $$x$$ and $$y$$ when both variables are expressed in another set of variables?

$$\frac{\partial z}{\partial r} =\frac{\partial z}{\partial x}\frac{\partial x}{\partial r} + \frac{\partial z}{\partial y}\frac{\partial y}{\partial r}$$
$$\frac{\partial z}{\partial \theta} =\frac{\partial z}{\partial x}\frac{\partial x}{\partial \theta} + \frac{\partial z}{\partial y}\frac{\partial y}{\partial \theta}.$$