Finding the values of X and Y in an equation