Question 1158026
There could be other ways to get a function that does that, but we could easily  find a ratio of polynomials (a rational function) that could do that.

Characteristic #1: A zero at x = 3
Having {{{(x-3)}}} as a factor would do that.
 
Characteristic #2: A hole when x = 5
Having {{{(x-5)/(x-5)}}} as a factor (having {{{(x-5)}}} as a factor in numerator and denominator) would do that.
 
Characteristic #3: A vertical asymptote at x = -1
Having {{{(x-(-1))=(x+1))}}} as a factor only in the denominator would do that.
 
So far we have the building blocks for a function that has the 3 characteristics above,
{{{f[1]}}}{{{(x)}}}{{{"="}}}{{{(x-3)(x-5)/(x-5)/(x+1)}}}{{{"="}}}{{{(x^2-8x+15)/(x^2-4x-5)}}} ,
with a graph that looks like this:
{{{graph(300,300,-14,6,-10,10,(x^2-8x+15)/(x^2-4x-5))}}} .
It even has a horizontal asymptote, but at {{{y=1}}} ,
and its y-intercept is {{{f[1](0)=(-3)(-5)/(-5)/(+1)=-3}}} .
The asymptote and intercept are not yet what we want.
If we add {{{2}}} , the horizontal asymptote becomes {{{y=3}}}, but then {{{x=3}}} is not a  zero.
If we include {{{3}}} as another factor, the he horizontal asymptote becomes {{{y=3}}} , but then the y- intercept becomes {{{-9}}} .
 
We need to meet the required characteristics #4 and #5 without loosing what we already have achieved.
 
Characteristic #4: A horizontal asymptote at y = 3
Characteristic #5: A y-intercept at y = -2
{{{f[1]}}}{{{(x)}}} has a {{{y=1}}} horizontal asymptote because it is the ratio of polynomials of the same degree, and when divide numerator {{{x^2-8x+15}}}  by denominator {{{x^2-4x-5}}} the quotient is {{{1}}}, and the remainder polynomial degree is less,
so that we could re-write {{{f[1]}}}{{{(x)}}} as {{{quotient+remainder/divisor}}} as
{{{f[1]}}}{{{(x)}}}{{{"="}}}{{{((x^2-4x-5)+(-4x+20))/(x^2-4x-5)}}}{{{"="}}}{{{1+(-4x+20)/(x^2-4x-5)}}} ,
and we know that {{{lim(x->infinity,(-4x+20)/(x^2-4x-5))=0 ,
so {{{lim(x->infinity,f[1](x))=1}}}
Of course the reason the quotient is {{{1}}} is that the leading coefficients of {{{x^2-8x+15}}} are {{{x^2-4x-5}}} both {{{1}}}, and their ratio is {{{1}}} .
The leading coefficient of {{{x^2-8x+15}}} is the product of the leading coefficients of the factors {{{(x-3)}}} and {{{(x-5)}}} that we had to include to get characteristics #1 and 2.
The leading coefficient of {{{x^2-4x-5}}} is the product of the leading coefficients of the factors {{{(x-3)}}} and {{{(x+1)}}} that we had to include to get characteristics #2 and #3.
The value of the y-intercept {{{(-3)(-5)/(-5)/(+1)=-3}}} depended only on the independent terms of factors {{{(x-3)}}} , {{{(x-5)}}} , and  {{{(x+1)}}} . 
We could include an extra factor {{{(x+1)}}} in the denominator,
and an extra factor {{{(3x+b)}}} in the numerator
to try to achieve characteristics #4 and #5.
Horizontal asymptote {{{y=3}}} is achieved by {{{f(x)=(3x+b)(x^2-8x+15)/(x+1)/(x^2-4x-5)}}}
because the ratio of leading coefficients would be {{{3/1=3}}} .
To get "A y-intercept at y = -2"we need {{{f(0)=b*15/(1(-5))=15b/(-5)
=-3b=-2}}}-->{{{b=2/3)))
Putting it all together we get
{{{f(x)}}}{{{"="}}}{{{(3x+2/3)(x-3)(x-5)/(x+1)/(x-5)/(x+1)}}}{{{"="}}}
{{{(9x+2)(x-3)(x-5)/(x+1)^2/(3x-15)}}}{{{"="}}}{{{(9x^3-70x^2-151x-30)/(3x^3-9x^2-27x-15)}}}
The graph would then be
{{{drawing(300,300,-10,20,-4,26,
green(line(-10,3,20,3)),green(line(-1,-4,-1,26)),
locate(5,17,asymptotes),green(arrow(4.8,16,-1,16)),
green(arrow(8,15,8,3)),
graph(300,300,-10,20,-4,26,(3x+2/3)(x^2-8x+15)/(x^2-4x-5)/(x+1))
)}}}
Closeup: {{{drawing(300,300,-5,5,-4,6,
green(line(-10,3,20,3)),green(line(-1,-4,-1,26)),
circle(0,-2,0.2),circle(3,0,0.2),
graph(300,300,-5,5,-4,6,(3x+2/3)(x^2-8x+15)/(x^2-4x-5)/(x+1))
)}}}