Firstly, solve 6 and 12.
[tex]\begin{gathered} 6=2\times3 \\ 12=2\times2\times3 \\ \\ \text{the greatest common factor is 2}\times3=6 \end{gathered}[/tex]Now, 12 and 24
[tex]\begin{gathered} 12=2\times2\times3 \\ 24=2\times2\times2\times3 \\ \text{the greatest common factor is 2}\times2\times3=12 \end{gathered}[/tex]Now, 3 and 18
[tex]\begin{gathered} 3=3 \\ 18=2\times3\times3 \\ \text{The greatest common factor is 3.} \end{gathered}[/tex]So, 12 and 24 have the greatest common factor.