I just don’t understand part (a). Why is the length vertically downwards, not 0.5 as that’s the length of the string in the pendulum. Why is it the other length instead that’s 0.5? I’m clearly being dumb but I can’t see why they would be different as the string doesn’t change length. Any replies would be very appreciated.
They aren't looking at the length vertically downwards.
They are determining the change in potential energy compared to when the pendulum bob is being held straight down. When the bob is fully downwards, the pendulum arm has a length of $0.50 \ m$. The change in potential energy when that arm is lifted only depends on the change in height of the mass.
The change in height of the mass would only be equal to $0.50 \ m$ if $\theta$ was $90°$. You can see from the diagram where they labelled $\Delta h$, and the new height $0.50 \cos 30°$; which means the change in height is obviously $\Delta h = 0.50 - 0.50 \cos 30° $, just like they've done here.