The GCD of given numbers is 6.
Step 1 : Find prime factorization of each number.
$$\begin{aligned}24 =& 2\cdot2\cdot2\cdot3\\[8pt]138 =& 2\cdot3\cdot23\\[8pt]24 =& 2\cdot2\cdot2\cdot3\\[8pt]138 =& 2\cdot3\cdot23\\[8pt]\end{aligned}$$(view steps on how to factor 24, 138, 24 and 138. )
Step 2 : Put a box around factors that are common for all numbers:
$$\begin{aligned}24 =& \color{blue}{\boxed{2}}\cdot2\cdot2\cdot\color{red}{\boxed{3}}\\[8pt]138 =& \color{blue}{\boxed{2}}\cdot\color{red}{\boxed{3}}\cdot23\\[8pt]24 =& \color{blue}{\boxed{2}}\cdot2\cdot2\cdot\color{red}{\boxed{3}}\\[8pt]138 =& \color{blue}{\boxed{2}}\cdot\color{red}{\boxed{3}}\cdot23\\[8pt]\end{aligned}$$Step 3 : Multiply the boxed numbers together:
$$ GCD = 2\cdot3 = 6 $$