I think there's an error in your slope calculation. The slope of the tangent line through the points and is . The derivative of the function is , and should be equal to slope at the corresponding value of x. So you have:

You should obtain a quadratic from this.

Edit: Note there should be two tangents, since you'll probably find two real roots.