Đáp án:
a) Theo Pytago ta có;
$\begin{array}{l}
M{N^2} + M{P^2} = N{P^2}\\
\Rightarrow N{P^2} = {12^2} + {16^2} = 400\\
\Rightarrow NP = 20\left( {cm} \right)\\
Theo\,t/c:\\
\dfrac{{AM}}{{MN}} = \dfrac{{AP}}{{NP}} = \dfrac{{AM + AP}}{{MN + NP}} = \dfrac{{16}}{{12 + 20}} = \dfrac{1}{2}\\
\Rightarrow \left\{ \begin{array}{l}
AM = 6\left( {cm} \right)\\
AP = 10\left( {cm} \right)
\end{array} \right.\\
b)\\
Theo\,Talet:\\
\dfrac{{AB}}{{MN}} = \dfrac{{AP}}{{MP}}\\
\Rightarrow \dfrac{{AB}}{{12}} = \dfrac{{10}}{{16}} = \dfrac{5}{8}\\
\Rightarrow AB = \dfrac{{15}}{2}\left( {cm} \right)
\end{array}$