Show that $\dim(Y)<\infty$, application of the Hahn-Banach theorem. $\textbf{The question is}$
Let $X,Y$ be a Banach space, $T:X\rightarrow Y$ an surjective linear transformation.
If $\exists D\subseteq Y$ compact: $T(B(0,1))\subseteq D$ then $\dim(Y)<\infty$
$\textbf{Demonstration: suspicion}$
Note that $D\subseteq \bigcup_{y\in D}^{}B(y,1/2)$ Since D is compact, then $\exists y_1,...,y_n \in D: D\subseteq \bigcup_{i=1}^{n}B(y_i,1/2)$.
In particular $B(0,1)\subseteq \bigcup_{i=1}^{n}B(y_i,1/2)$ then eliminating the possible $i$ such that $B(0,1)\bigcap B(y_i,1/2)=\emptyset$ and without loss of generality we have that
$B(0,1)\subseteq \bigcup_{i=1}^{k\leq n}B(y_i,1/2)$.
$\textbf{My question}$
I haven't really accomplished much but my suspicion is that $\left \{y_1,...y_k  \right \} $ is the candidate to be base of $Y$, but I'm kind of stuck with this....
I also believe that T is continuous, and I could apply the Hahn Banach theorem, (T sends open in open) I am also trying to prove this, although I don't know if I can help with this problem.
If someone could guide me to continue, I thank you.

I assume that $T$ is surjective. The condition $T(B_X(0,1))\subset D,$ where $D$ is compact, implies that $T(B_X(0,1))$ is bounded. Therefore $T$ is a bounded (i.e. continuous) operator. By the open mapping theorem $$T(B(0,1))\supset B_Y(0,r)=rB_Y(0,1)$$ for a number $r>0.$ Thus $B_Y(0,1)$ is relatively compact,hence $Y$ is finite dimensional (see).
