Rearrange the given current equations to express \( E \):
\[ E = I_1 (R_1 + r) \quad \text{and} \quad E = I_2 (R_2 + r) \]
Since both expressions equal \( E \), they can be set equal to each other:
\[ I_1 (R_1 + r) = I_2 (R_2 + r) \]
Expand both sides of the equation:
\[ I_1 R_1 + I_1 r = I_2 R_2 + I_2 r \]
Group terms containing \( r \) on one side and other terms on the other:
\[ I_1 r - I_2 r = I_2 R_2 - I_1 R_1 \]
Factor out \( r \):
\[ r (I_1 - I_2) = I_2 R_2 - I_1 R_1 \]
Divide by \( (I_1 - I_2) \) to find \( r \):
\[ r = \frac{I_2 R_2 - I_1 R_1}{I_1 - I_2} \]
The formula for internal resistance \( r \) is:
\[ r = \frac{I_2 R_2 - I_1 R_1}{I_1 - I_2} \]