Write a function with vertical asymptote x=4, horizontal asymptote y=1, y intercept at (0,2).
A possible function can be express as:

Let's prove that this function fulfils our conditions. Let's start with the y-intercept, we know that this happens when x=0, then we have:

Hence the y-intercept is at (0,2).
Now, we know that a rational function has horizontal asymptote y=b if:

Let's find these limits:

and:

This means that we have a horizontal asymptote y=1 as we wanted.
Now, a rational function has vertical asymptote at x=a if:

to determine the value of a we need to look where the function is not defined, that is, the values which make the denominator zero, in this case we have:

Then we need to find the limits:

Now, if we approach the value x=4 from the left we notice that as x gets closer to 4 the function gets bigger and bigger, for example:

if we follow this procedure, we conclude that:

Similarly, if we approach x=4 from the right the function gets smaller and smaller, for example:

Then we can conclude that:

Hence, we conclude that the function we proposed has a vertical asymptote x=4 like we wanted.
the properties we gave can be seen in the following graph: