First, substitute \(k = 2\) into the equations:
Line: \(y = 2x + 6\)
Curve: \(y = x^2 + 3x + 4\)
Set the equations equal to find intersection points:
\(x^2 + 3x + 4 = 2x + 6\)
Simplify to: \(x^2 + x - 2 = 0\)
Factorize: \((x - 1)(x + 2) = 0\)
Solutions: \(x = 1\) and \(x = -2\)
Find corresponding \(y\)-values:
For \(x = 1\), \(y = 2(1) + 6 = 8\)
For \(x = -2\), \(y = 2(-2) + 6 = 2\)
Points \(A(1, 8)\) and \(B(-2, 2)\)
Distance \(AB\):
\(AB = \sqrt{(1 - (-2))^2 + (8 - 2)^2} = \sqrt{3^2 + 6^2} = \sqrt{45} = 3\sqrt{5}\)
Midpoint of \(AB\):
\(\left(\frac{1 + (-2)}{2}, \frac{8 + 2}{2}\right) = \left(-\frac{1}{2}, 5\right)\)