This is from Boyd & Vandenberghe's Convex Optimization:
Show that $$ \min_{x \in \left\{x : c^T x +d > 0 \right\}} \ \frac{\|Ax-b\|_2^2}{c^T x + d} $$ has a minimizer $x^* = x_1 +t x_2$ where $$ x_1 = \left( A^T A \right)^{-1} A^T b, \qquad x_2=\left( A^T A \right)^{-1} c $$ and $t \in \mathbb{R}$ is obtained by solving a quadratic equation.
From the structure of the solution, it seems like I am supposed to split the problem into two parts, but apart from that I don't really understad how to solve this. I tried to differentiate to find the minimizer, but I didn't get anything of this form. (In the problem before this, we had to show that $f$ is closed, if that is relevant).