The function $f$ has an inverse on $S$ if, given $f(x)$, where $x$ is in $S$, we can uniquely recover the value of $x$. To put it another way, if there are two distinct numbers $s$ and $t$ in $S$ such that $f(s)=f(t)$, then $f$ does not have an inverse $f^{-1}$ defined on the set $S$.
By completing the square, we see that $f(x)=(x-5)^2-7$. So any set $S$ that contains two different numbers $s$, $t$ symmetrical about $5$ is bad. For then $f(s)=f(t)$, which means we cannot always uniquely recover $x$ given the value of $f(x)$.
That observation rules out answer B, since $[0,\infty)$ contains for example the two numbers $4.5$ and $5.5$ symmetrical about $5$. Unfortunately, B is the only answer that is thus ruled out.
We have to rule out three other answers by using the undefined notion of "largest" possible set. Maybe we can agree (???) that if $U \subset V$ and $U\ne V$, ( that is, if $U$ is a proper subset of $V$) then $V$ is larger than $U$. Then answer A gets ruled out, because $(-\infty,0]$ is a proper subset of $(-\infty,5]$.
Answers C and D can be more plausibly ruled out because each of $[0,5]$ and $[5,100]$ is an interval of finite length, while our leader so far, $(-\infty,5]$, is an interval of infinite length, and thus arguably larger. So the only surviving answer is E.
Comment: The question is in my view unfortunate, since the critical fact you need to know is that if $f(s)=f(t)$ for two distinct numbers $s$, $t$, in $S$, then $f^{-1}$ cannot exist on $S$. Conversely, if one cannot find distinct $s$, $t$ in $S$ such that $f(s)=f(t)$, then an inverse function $f^{-1}$ does exist on $S$.
So B is easy to rule out. Ruling out others rests on giving interpretations to "largest." It turns out that for infinite sets, there are various criteria of largeness. For example, under most standard mathematical definitions of largeness, the sets $(-\infty,0]$ and $(-\infty,5]$ are of the same size.