(a) When a wire is stretched through a length, then work has to be done, this work is stored in the wire in the form of elastic potential energy
Potential energy of stretched wire is
$U = \frac{1}{2} \times stress \times strain$
$\therefore U = \frac{1}{2} \times F \times s \Rightarrow U = \frac{1}{2}Fx$