In order to make the equation true, the expression in the left side needs to have the same base and exponent of the expression in the right side.
So we have:

Using the value of y = 4 so we have the same exponents, we have:

Since the exponents are the same, we can multiply the bases and use the same exponent:

So the answer is x = 3 and y = 4