18 = 6x x+5x is 6x
18/6=6/6 so then you divide 18 and 6 by 6
3=x you cancel out the 6 so now it's just x and 18 divided by 6 is 3.