Let's make a diagram to visualize the problem.
First, let's find angle A.
[tex]\begin{gathered} A+B+C=180 \\ A+42+71=180 \\ A=180-71-42 \\ A=67 \end{gathered}[/tex]Then, we use the law of sines to find AB.
[tex]\begin{gathered} \frac{AB}{\sin71}=\frac{BC}{\sin A} \\ \frac{AB}{\sin71}=\frac{22}{\sin 67} \\ AB=\frac{22\cdot\sin 71}{\sin 67} \\ AB\approx23 \end{gathered}[/tex]