First we can recognize that angle OPQ shares a straight angle with angle QPR, meaning mQPR = 180 - 135 = 45 degrees. Given that angle PRQ is a right angle (90 degrees) and knowing that the interior angles of a triangle dum to 180, we can find that angle PQR (angle Q) is 180 - 90 - 45 = 45 degrees, and
tan(45) = 1