Notice that in order to cancel the x out of the denominator I first factored an out of the numerator. You can only cancel something if it is multiplied by the WHOLE numerator and denominator, or if IS the whole numerator or denominator (as in the case of the denominator in our example).