It's like adding and subtracting. All the ones with x's go together, and all the y's go together (or whatever other letters there are.) 8x+2x=10x
10x-9x=1x
1x=x (if there's a letter and the number next to it is 1 it is just the letter)
Now x-3y is your solution because x and y don't go together