3 * x = 4y (from the question)
X+y = 21 (from the question)
3(21-y) = 4y (sub equation 2 in equation 1)
63-3y = 4y
Y=9 (now you sub the 9 instead of y in any of the equations and solve for x)
X=21-y = 21-9 = 12
Hope it helps, the logic is sound just go over the math.