By definition, we have

So, we have to solve two different equations, depending of the possible range for the variable. We have to remember about these ranges when we decide to accept or discard the solutions:
Suppose that 
In this case, the absolute value doesn't do anything: the equation is

We are supposing
, so we can accept this solution.
Now, suppose that
. Now the sign of the expression is flipped by the absolute value, and the equation becomes

Again, the solution is coherent with the assumption, so we can accept this value as well.
Answer:
Step-by-step explanation:
we know that
A relationship between two variables, x, and y, represent a proportional variation if it can be expressed in the form
or 
In a proportional relationship the constant of proportionality k is equal to the slope m of the line and the line passes through the origin
we have the point (-30,18)
so
x=-30, y=18
Find the value of k
substitute
Simplify
Divide by 6 both numerator and denominator
B. is the answer because he can just refill the 1 gallon jug to eventually measure out 3 gallons!