(b) Let L is the original length of the wire and k is force constant of wire.
Final length = initial length + elongation
$L^{'} = L + \frac{F}{k}$
For the condition
$a = L + \frac{4}{k}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ldots(i)$
For the second condition
$b = L + \frac{5}{k}\ \ \ \ \ \ \ \ \ \ \ \ \ \ldots(ii)$
By solving Eqs. (i) and (ii), we get
$L = 5a - 4b\ \ and\ k = \frac{1}{b - a}$
Now, when the longitudinal tension is 9N, length of the string
$= L + \frac{9}{k} = 5a - 4b + 9(b - a)$
=5b-4a