The function f is given by the first formula
when x < -2 and
by the second formula
when -2 is less than or equal to x.
I can't figure out what value I have to put in for a to make the function continuous at -2?
The only problem with finding the limit- and the only reason why you want to factor- is that both numerator and denominator are 0 when x= -12. And that tells you that (x- (-2))= x+ 2 is a factor. Divide by x+ 2 ("synthetic division" works nicely here) to find the other factor.