According to Faraday's second law of electrolysis "when the same quantity of electricity is passed through solutions of different electrolytes connected in series, the weights of substances produced at the electrodes are directly proportional to their equivalent weights".
If M stands for atomic weight of substances
Equivalent weight of Cu=2M
Equivalent weight of Ni=2M
Equivalent weight of Ag=1M
So, the proportion of moles of metals 2M:2M:1M ∴1:1:2