y = 1 + 1/((x -1)(x -4))

Step-by-step explanation:

To get vertical asymptotes at 1 and 4, you need factors (x -1) and (x -4) in the denominator. As x approaches 1 or 4, one of these will approach zero, and the function value will approach infinity.

To get a horizontal asymptote of 1, the function must approach the value 1 when the value of x gets large (positive or negative). This can generally be accomplished by simply adding 1 to a fraction that approaches zero when x is large.

Here, we make the fraction be the one that gives the vertical asymptotes, and we simply add 1 to it.

... y = 1 + 1/((x -1)(x -4))

If you like, this can be "simplified" to ...

... y = (x² -5x +5)/(x² -5x +4)

_____

In this rational expression form, please note that the numerator and denominator have the same degree. That will be the case when there is a horizontal asymptote. (When a slant asymptote, the numerator degree is 1 higher than the denominator.) The ratio of the coefficients of the highest degree terms is the horizontal asymptote value (or the slope of a slant asymptote).