Substituting our values into the formula we get
I must assume that you meant the following:
10(Q-3R)
P = ----------------
R
Multiplying both sides by R, we get PR = 10R(Q-3R), or PR = 10RQ - 30R^2.
Rearranging these terms so that powers of R are in descending order:
30R^2 - 10RQ + PR = 0
Factoring out R, we get
R(30R - 10Q + P) = 0. This has two solutions:
R = 0, and 10Q - P
30R = 10Q - P, so that R = --------------
30
This is not a function. The input 7 in set A maps to outputs -1 and -3 at the same time in set B, which is why we don't have a function.
For a function to be possible, each input must map to exactly one output only.