There seems to be something wrong with the question because a linear equation has no asymptote.
But I can answer the remaining part of the question. The y intercept is when x=0 so q=2.
The line passes through (2,10) so 10=2a+2, 2a=10-2=8, so a=4 and f(x)=4x+2.