Find the CG of each separately, Then find the "weighted" average with each weighted by its mass. That is, using x to mean "x-coordinate". CGx= (m1CG1x+ m2CG2x)/(m1+ m2). The same is true for the y and z components.