I am dealing with a problem where I'm given an ungrounded spherical conductor with radius $R$ which is centered at the origin, the sphere is charged with a total charge $Q$. Besides the spherical conductor, there is a charge $q$ located at $h\hat{z}$ and a charge $-q$ located at $(h+d)\hat{z}$ where $h>R, d>0$. I am asked to find the electric potential in all of space. I already figured out that in order to find the potential outside the sphere I need to use the method of image charges and that the total charge of all image charges inside the region bounded by the sphere should be equal to $Q$. However, I have no idea how to find how many image charges should I place inside the sphere, where should I place them, and where exactly should I place them.
I would appreciate an explanation of how to find the wanted locations and charges of each image charge in this particular problem as well as an explanation of the general method of solving such problems.