The first factor is usually just found by trial and error. I mean, you could do bisection or Newton's method or something, but it's always fair to assume that these questions have whole number factors because they don't want the student getting caught up in stupid details. By the way, how is it you don't know how to do this? Are you ahead of the class or something?