Let’s discuss the problem where we have to find the potential of metal sphere.

The Problem:

A metal sphere having a radius (r_1) charged to a potential (\phi_1) is enveloped by a thin-walled conducting spherical shell of radius (r_2). Determine the potential (\phi_2) acquired by the sphere after it has been connected for a short time to the shell by a conductor.

Solution:

The charge (q_1) of the sphere can be determined from the relation $$ q_1=4\pi\epsilon_0r_1$$
After the connection of the sphere to the envelope, the entire charge (q_1) will flow from the sphere to the envelope and will be distributed uniformly over its surface.
Its potential (\phi_2) (coinciding with the new value of the potential of the sphere) will be
$$ \phi_2=\frac{q_1}{4\pi\epsilon_0r_2}=\phi_1\frac{r_1}{r_2}$$