I don't have a clear perception of how the following question is answered: "Two primary cells of emfs E1 and E2 respectively are joined in series with (i) the same polarity, and (ii) opposite polarities. The combination is connected through a galvanometer and a jockey to a potentiometer. The balancing lengths in the two cases are found to be 350 cm and 50 cm respectively. Find the ratio of E1 and E2." With a little bit of calculation I get the answer, 4:3. With the knowledge of the basic principle of potentiometer and from what I have learnt from my physics textbook, the sum of the two emfs is proportional to the length given in the first case, and when E2 is subtracted from E1, the result is proportional to the length given in the second case. I don't quite understand why the emfs are added when they are joined with the same polarity and subtracted when they are joined the other way round.