Since NR is perpendicular to MQ,
Since NR intersected MQ at S, then
The four angles formed between them are right angles

Since
Then add them and equate the answer by 90

Divide both sides by 6

Since angle MSR = 90 degrees, then

Subtract 18 from each side

Divide both sides by 9

The answers are
x = 15
y = 8