The cells are in series, so the same charge passes through both.

Step 1 — charge that deposited 2 g of Cu.
Cu2+(aq)+2e−→Cu(s)
1 mol Cu (63.5 g) needs 2 mol of electrons, i.e. 2×96500=193000 C.
Q=63.5 g mol−12 g×2×96500 C mol−1=6078.7 C
Step 2 — time.
t=IQ=2 A6078.7 C=3039.4 s≈50 min 39 s
Step 3 — mass of Zn in cell A. Zinc also takes 2 electrons per atom:
Zn2+(aq)+2e−→Zn(s)
mZn=2FQ×MZn=2×965006078.7×65=0.0315 mol×65 g mol−1=2.05 g
(Check: both ions are +2, so the same number of moles of Zn and Cu are deposited, and mZn=2×63.565=2.05 g.)
Answer: the current flowed for 3039 s (about 50.7 min); mass of zinc deposited =2.05 g.