Lời giải:
Kẻ $AH\perp BC$. $(H\in BC)$
Xét tam giác $ABH$ có:
$\frac{BH}{AB}=\cos 60^0=\frac{1}{2}$
$\Rightarrow AB=2BH$
Áp dụng định lý Pitago:
$AH^2=AB^2-BH^2=(2BH)^2-BH^2=3BH^2(1)$
$AH^2=AC^2-CH^2=(12-AB)^2-(8-BH)^2$
$=(12-2BH)^2-(8-BH)^2=3BH^2-32BH+80(2)$
Từ $(1);(2)$ suy ra $3BH^2=3BH^2-32BH+80$
$\Rightarrow BH=2,5$ (cm)
$\Rightarrow AB=2BH=5$ (cm)