We are given the component of the metric $g_{\alpha\beta}$ in a particular set of coordinates: $\{x^\gamma\} = \{y, \theta, \phi_1, \phi_2\}$. For a different set of coordinates, $\{x^{\bar{\sigma}}\}=\{R, \psi, \phi_1, \phi_2\}$, the metric has components $g_{\bar{\mu}\bar{\nu}}$ given by the transformation law between components of $0 \choose 2$ tensors.
$$g_{\bar{\mu}\bar{\nu}} = \frac{\partial x^\alpha}{\partial x^{\bar{\mu}}}\frac{\partial x^\beta}{\partial x^{\bar{\nu}}}g_{\alpha\beta}$$
You can get these partial derivatives by taking derivatives of the "substitution" in the OP. This isn't a particularly clever way of getting the new metric components, but it's the most algorithmic.