The answer was given as 63 and 36.

If 42 is a factor of x, why wouldn’t it be a factor of x^{2}?

I looked this up in the internet and 42 is not an option: x is disible by 42. - The Beat The GMAT Forum - Expert GMAT Help & MBA Admissions Advice, If x is divisible by 42. Which of the following numbers is d : PS Archive

If it were, 42 would be a valid answer, right?

Yes.