Analyzing a resistor circuit with two batteries