When the two spheres are connected to each other through a wire, then the potential of both the spheres reaches a common value. The spheres are essentially capacitors connected in a parallel combination.
This common potential can be found using the formula,
Where, q and Q are the charges on the inner and outer spheres respectively and andare their respective capacitances.
The capacitances of the spheres are given by,
And
The common potential when the two spheres are connected by a wire is thus given by,
The charge on the inner sphere would be the product of its capacitance and this common-potential.
Thus,
Hence, the charge on the inner sphere is .