The value of all the line is 180° ( Straight angle)
So the 3 angles shown add up to 180°
There is a 90° angle in the middle (right angle)
And the measure of the other angle is 59
180-90-59 = 31
That means that:
5z + 1 = 31
5z = 30
z = 6
Answer: z = 6