Think of ways to factor the last number 27. One way is 1*27 = 27. Another way is 3*9 = 27 and so on. Now think to yourself "which factor of 27 add to -12?". You'll need to consider negative factors. It turns out that
-3 plus -9 = -12
-3 times -9 = 27
Therefore the two values we care about are -9 and -3. So x^2-12+27 factors to (x-3)(x-9). The order of the factors does not matter. So we can write the answer as (x-9)(x-3) just fine.
Well.... First you find all possible exits then make sure no one leaves. Then you take out the adults(If any) to make sure no one is called. Finally light them up. Depending on where they are will depend on how many rounds you use.