When factoring, you want to pull out the greatest common factor. Between 42 and 12 we have a common factor of 6. 2 would go into both too, but is not the greatest common factor. We do not have a common variable though.
=42x + 12y
=6(7x + 2y)
CHECK:
=6(7x + 2y)
=(6*7x) + (6*2y)
=42x + 12y
ANSWER: 6(7x + 2y)
Hope this helps! :)