if p is a rate, revolutions per minute, and x is a time, minutes, then you may have and you treat this as any other "uniform rates" problem.
Now you want to solve for x which is the amount of minutes. You have the rate and you have the amount; you have p and you have q; but you want to find x.