You have to find the greatest common factor first.
To do so, do as follows:
Factors of 6 are: 1, 2, 3, 6
Factors of 12 are: 1, 2, 3, 4, 6, 12
Factors of 42 are: 1, 2, 3, 6, 7, 14, 21, 42
The greates common factor is the greatest common factor shared by all values, in this case is 6
Now to factor it out you have to divide each term of the equation by it.
The expression with the GCF factorized is then: