
The charge on the capacitor is given by q=CV.
Initial charge on C=18CV
And initial charge on 3C=54CV
Let final common potential difference =V′
When a dielectric of dielectric constant k is introduced between the plates of the capacitor the capacitance becomes k times.

Applying conservation of charge,
9CV′+3CV′=18CV+54CV
⇒12CV′=72CV⇒V′=6V