In solving these types of questions, following points should be kept in mind :-
(a) The facing charges acquires equal and opposite charges [Using gauss's law]
(b) Charge on an electrically isolated system is remains conserved.
(c)The charge on outer surfaces of outermost plates are equal and is given by
So, in the present case, charges on oter surfaces of outer plates = (3Q + 2Q) / 2 = 5 Q /2
But since the plates r grounded, so the charges on the outer surfaces reduces to zero.