Shortcut Method :
Internal Resistance of Unknown Battery
r=(ℓ2ℓ1−ℓ2)R
Where l1 means balanced length when key K1 is open
Where l2 means balanced length when key K1 is closed
Here l1 = 120 cm and l2 = 80 cm and R = 4 Ω
∴ r=(80120−80)×4 = 2 Ω
Normal Method :
Original Potentiometer is →

Here, AB is called potentiometer wire. Let length of AB = l and resistance = R
∴ (1) Current in the circuit (i) = R+Rh4
(2) Potential difference between A and B is
= VA − VB = ΔVAB = i × R
(3) ABΔVAB=LengthPotentialdifference = Potential Gradient
⇒lΔVAB=liR=R+Rh4×lR Volt/m
Now, a circuit added to potentiometer wire.
When K1 is open then circuit look like the following.

When null point is found at C then no current will flow through the circuit added to the potentiometer wire.
Potential difference between A and C is
(1) From potentiometer wire :
VA−VC=ΔVAC=lVAB×120=(R+Rh)l4R×120 ...... (1)
(2) From external circuit :
VA − 1.5 − 0 × r = VC
⇒ VA − VC = 1.5V = ΔVAC ...... (2)
Comparing equation (1) and (2), we get
(R+Rh)l4R×120=1.5 ..... (3)
When the key K1 is closed then circuit look like this →

When null point is found at C then no current will flow through the circuit added to the potentiometer wire but i1 current will flow through circuit created using 1.5V with internal resistance r and 4Ω resistance.
Potential difference between A and C is
(1) From potentiometer wire :
VA−VC=ΔVAC=lVAB×80=(R+Rh)l4R×80 ....... (4)
(2) From external circuit :
i1=4+r1.5
VA−1.5+i1r=VC
⇒VA−VC=1.5−i1r=1.5−4+r1.5r ..... (5)
Or we can use this also,
VA−i1×4=VC
⇒VA−VC=i1×4=4+r1.5×4
From equation 4 and 5, we get
(R+Rh)l4R×80=1.5−4+r1.5r
⇒1201.5×80=1.5−4+r1.5r [From equation 3]
⇒1.5×32=1.5−4+r1.5r
⇒4+r1.5r=1.5−1.5×32
⇒4+r1.5r=1.5×31
⇒3r=4+r
⇒2r=4
⇒r=2Ω
Other Method :

Now this can be converted to single battery and single resistance using combination of battery rule,

We know,
Eeq=r1+r2E1r2+E2r1
and req=r1+r2r1r2
∴ Here, Eeq=4+r1.5×4+0×r=4+r6
and req=4+r4r
∴ Circuit becomes

When null point is found at C then no current will flow through the circuit added to the potentiometer wire.
Potential difference between A and C is
(1) From potentiometer wire :
VA−VC=ΔVAC=lVAB×80=(R+Rh)l4R×80 .... (4)
(2) From external circuit :
VA−4+r6−0×4+r4r=VC
⇒VA−VC=4+r6 ...... (5)
From equation 4 and 5, we get
(R+Rh)l4R×80=4+r6
⇒1201.5×80=4+r6 [From equation 3]
⇒1.5×32=4+r6
⇒4+r=6
⇒r=2Ω