Answer
$$\Delta U=-0.018 \mathrm{J}$$
Work Step by Step
Consider a differential component of length $d x$ at a distance $x$ from one end (the end that remains jap) of the cord. As the cord turns vertical, its change in potential energy is given by
$$
d U=-(\lambda d x) g x
$$
where $\lambda=m / h$ is the mass/unit length and the negative sign mark that potential energy is decreases. Integrating over the entire length, we obtain the total change in the potential energy:
$$
\Delta U=\int d U=-\int_{0}^{h} \lambda g x d x=-\frac{1}{2} \lambda g h^{2}=-\frac{1}{2} m g h
$$
With
$$m=15 \mathrm{g}$$ and $$h=25 \mathrm{cm},$$ we have $$\Delta U=-0.018 \mathrm{J}$$