Let the EMF of the cell be E and its internal resistance be r.
The current I in the circuit is given by I=R+rE.
For the first case, R1=5 Ω and I1=0.25 A:
0.25=5+rE⇒E=0.25(5+r)
For the second case, R2=2 Ω and I2=0.5 A:
0.5=2+rE⇒E=0.5(2+r)
Equating the expressions for E:
0.25(5+r)=0.5(2+r)
5+r=2(2+r)
5+r=4+2r
r=1 Ω
Answer: 1