Answer :

6 is a number that goes into both 18 and 42 if that helps, you can divide 18 by 6 and you get 3, then 42 by 6 and get 7, and that is how you simplify that part. I hope that helped :)