finding equation of line tangent