The charge on the surface will be $(Q+q)$ when the charge q is placed in the cavity equal and opposite charge (-q) is included at the inner surface of the cavity and therefore equal charge $+q$ is transferred to the other surface .