If y varies directly with x then

First, we need to find the constant of a variation k, for this, we use the given values of x and y:

Then since we already have the value of k we can find the value x when y = 21:

Therefore, if y = 12 when x = 15, then

when y = 21.