This seems to me as a very simple and basic question, though I'm having trouble with it.
The Problem
Given a sphere $K\in\mathbb{R}^n$ with radius $r\in\mathbb{R}$ and center $\vec{c}\in\mathbb{R}^n$: $K:||\vec{x}-\vec{c}||_2^2=r^2$
And a given line along $\vec{n}\in\mathbb{R}^n$, $||\vec{n}||_2=1$ through $\vec{x}\in\mathbb{R}^n$: $g: \vec{x}+\vec{n}d$
Substituting the line into the equation of $K$ gives $||\vec{x}+\vec{n}d-\vec{c}||_2^2=r^2$ which results in the quadratic equation $\sum_{i=1}^{n}(x_i+n_id-c_i)^2-r^2=0$
Within my problem, it is ensured, that the supporting vector $\vec{x}$ of the line is always within the sphere. With my understanding, this simplifies the solutions of the quadratic equation in such a way, that there are always two solutions for $d$.
The Question
And this is the point, where I got stuck. How can this be rewritten either by using the quadratic formula ($ax^2+bx+c=0 \Rightarrow x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a^2}$) or as a system of equations?
Any help is appreciated. Thank you.