Taking tangents from the point P to the spheres defines two caps. If P is a distance from the centre of the smaller sphere, then the depth of the smaller cap will be and the depth of the larger one

The surface area of a spherical cap depth sphere radius is so the combined surface area of the two caps will be

For maximum differentiate this and equate to zero.

Assuming this to be correct, that gets you and a corresponding