Explanation:
you need the factors, or the prime factors ? or both ?
it is not clear what you need, I will try to give you a much as possible for this topic, abd you will need to pick from there what you need.
it seems clear that we are dealing with 42 and 77.
let's start with prime factorization. you know what prime numbers are ? numbers that can only be divided without remainder by 1 and by itself. we always start with the smallest prime factor (2) and then work our way up until we get 1 as result :
42 ÷ 2 = 21
21 ÷ 2 no
21 ÷ 3 = 7
7 ÷ 3 no
7 ÷ 5 no
7 ÷ 7 = 1
finished
77 ÷ 2 no
77 ÷ 3 no
77 ÷ 5 no
77 ÷ 7 = 11
11 ÷ 7 no
11 ÷ 11 = 1
finished
so,
42 = 2×3×7
prime factors (2, 3, 7)
the factors are the prime factors and all possible combinations plus 1 and the number itself :
2×3 = 6
2×7 = 14
3×7 = 21
factors are (1, 2, 3, 6, 7, 14, 21, 42)
77 = 7×11
prime factors (7, 11)
there are no additional combinations.
factors are (1, 7, 11, 77)
the GCF is the product of the longest chains of prime factors they have in common.
the only prime factor chain 42 and 77 have in common is one time 7.
GCF (42, 77) = 7
FYI : there is also a thing called the smallest of least common multiple LCM. this is the smallest possible number that can be divided by both numbers without remainder.
it is the product of the longest chains of all prime factors in both numbers.
so, we have
LCM (42, 77) = 2×3×7×11 = 462