Suppose we want to know the total cost of buying x toys and we know that each toy costs $2. The relationship between the cost and the number of toys is
C(x) = 2x
If we purchase 6 toys, the cost would be
C(6) = 2*6 = $12
This is an example where it's adequate to use a single variable (or unknown) to find the value of another variable.
Now suppose we want to know the total cost of buying x toys for $2 each and include the tax rate in the calculations.
If we know the tax rate r, we can compute the total cost as
C(X,r) = 2x*(1 + r/100)
For example, to purchase x=6 toys and the tax rate is r=8%, the total cost is:
C(6,8) = 2*6*(1 + 8/100)=$12.96
If we had tried to calculate this cost without the use of two unknowns, it would have not been possible.
Thus, the pattern to use one or two variables depends on how many factors determine the final result.