b
When the two way key is switched off, then The current flowing in the resistors $R$ and $X$ is
$I=1\, \mathrm{A}$ .......$(i)$
When the key between the terminals $1$ and $2$ is plugged in, then
Potential difference across $R=I R=k l_{1}$ ......$(ii)$
where $k$ is the potential gradient across the potentiometer wire
When the key between the terminals $1$ and $3$ is plugged in, then
Potential difference across $(R+X)=I(R+X)=k l_{2}$ ....$(iii)$
From equation $(ii),$ we get
$R=\frac{k l_{1}}{I}=\frac{k l_{1}}{1}=k l_{1} \Omega$ .......$(iv)$
From equation $(iii),$ we get
$R + X = \frac{{k{l_2}}}{I} = \frac{{k{l_2}}}{1} = k{l_2}\,\Omega \quad {\rm{ (Using }}({\rm{i}}))$
$X = k{l_2} - R$
$ = k{l_2} - k{l_1}{\rm{ }}\,\,\,\,\,\,\,\,\,\,\,{\rm{(Using}}\left( {iv} \right){\rm{)}}$
$=k\left(l_{2}-l_{1}\right) \,\Omega$