For what values of a and m does f(x) have a horizontal asymptote at y = 2 and a vertical asymptote at x = 1?

for a rational expression the vertical asymptotes occur when the denominator equals 0, in this case that will be when x + a = 0.
now, if there were to be a vertical asymptote of x = 1, that simply means that
x = 1 ==> x - 1 = 0.
meaning that a = -1.
horizontal asymptotes occur when the denominator has a higher degree than the numerator OR when both have the same degree.
when the degree of the denominator is higher, then the only horizontal asymptote occurring is y = 0.
when the degrees are the same, then the horizontal asymptote occurs at the leading terms' coefficient fraction.
now, if this expression were to have a horizontal asymptote of y = 2, that simply means
[tex]\bf \cfrac{2x^m}{x+a}\implies \cfrac{2x^1}{1x^1+a}\implies \stackrel{\textit{horizontal asymptote}}{\cfrac{2}{1}\implies y=2}\qquad \textit{meaning m = 1}[/tex]
ANSWER
a=-1,m=1
EXPLANATION
The given function is
[tex]f(x) = \frac{2 {x}^{m} }{x + a} [/tex]
For this rational function to have a horizontal asymptote at y=2, the degree of the numerator must equal the degree of the denominator.
This implies that, we must have m=1.
For the function to have a vertical asymptote at x=1, then,
[tex]1 + a = 0[/tex]
This implies that,
[tex]a = 0 - 1[/tex]
[tex]a = - 1[/tex]
The correct choice is the third option.