To calculate the slope of a tangent you need the gradient of the function. The 1rst derivative gives you the gradient for any value of x. Use quotient rule and chain rule:
. Simplify to
. You are looking for a horizontal tangent which have the slope zero:
f'(x) = 0 if x - 1 = 0. Thus x = 1
Plug in this value into f(x) and you'll get
Thus the equation of the tangent is: y = 1
I've attached a diagram.