AS the capacitor is disconnected from electricity supply, the total charge of the system remains constant.
Q = CV1 ---------------------- (1)
When we join two capacitors, they become parallelly connected.
So, net capacitance,
Cnet = C + KC = (K+1)C
So,
Q = (K+1)CV2 --------------------- (2)
substitute value of Q/c from one in two and you get the answer
Hope you have got it !!!!!!