That's the second one,
180 - x = r
Whenever two lines cross we get congruent opposite angles and supplemental adjacent angles, i.e. they add to 180 degrees.
The first one is almost right; we have r+y+z=180 and r+x=180 so x=y+z not quite what was written.