Solve for q p/q=r/s