Answer
$A=1$
$B=2$
Work Step by Step
It is given, that $f(2)=0$.
By substituting $x=2$ into the function $f(x)$ we obtain:
$f(2)=\frac{2-B}{2-A}
\\
0=\frac{2-B}{2-A}$
$f$ is not defined when the denominator equals $0$.
Since $f(1)$ is undefined, the it follows that the denominator is equal to $0$ when $x=1$.
Hence,
$1-A=0$
$1-A+A=0+A$
$1=A$
Substituting $1$ to $A$ in $0=\frac{2-B}{2-A}$ gives:
$0=\frac{2-B}{2-1}\\
0=\frac{2-B}{1}$
$0(1)=2-B\\
0=2-B\\
B=2$