I assume that the expression is \(\frac {p^2+p'^2-1}{q^2+q'^2-1}\) (this assumption is due to the absence of appropriate brackets).
For oblique axes system, we have:
\(x=x'\frac {sin(\omega-\theta)}{sin\omega}+y'\frac{sin(\omega-\omega'-\theta)}{sin\omega}\)
\(y=x'\frac {sin\theta}{sin\omega}+y'\frac{sin(\omega'+\theta)}{sin\omega}\)
\(\omega\)= Angle between the axes X and Y
\(\omega'\)= Angle between the axes X' and Y'
\(\theta\)= Angle between the axes X and X'
One can refer to Loney's Coordinate Geometry for more on the above.
Just comparing the above two results to what is given in the problem and then considering \(\frac {p^2+p'^2-1}{q^2+q'^2-1}\) and simplifying the trigonometry, things work out well.
If you have further problem on this, you may send me a message from my profile page or from the virtual classroom and I can find some time for live session.