This is the concept of trigonometry, given that the current length of the roof is 32 ft, for use to get the adjusted length we need to get the adjacent distance;
cos theta=[adjacent]/[hypotenuse]
theta=18.2°
adjacent=a
hypotenuse=32
hence;
cos 18.2=a/32
a=32cos 18.2
a=30.4
When the angle was re-adjusted to 50 ° the new length will be given by:
cos 50=30.4/h
h=30.4/cos 50
h=47.29 ft
therefore the new roofline will be 47.29 ft