I never used the fact the $X$ is compact in my proof below. Which makes me worry if my proof is complete.
Let $X$ and $Y$ be metric spaces, $X$ compact, and $T: X \to Y$ bijective and continuous. To show that $T^{-1}$ is continuous, we will proceed by contradiction. That is, suppose that $T^{-1}$ is discontinuous. Since $T$ is bijective, then every element $y \in Y$ is uniquely determined by an element $x \in X$, \emph{viz.}, $Tx = y$ or equivalently $x = T^{-1}y$. By continuity of $T$, if $(x_n)$ is a convergent sequence in $X$ with limit point $x_0 \in X$, then $Tx_n = y_n \to Tx_0 = y_0$. However, this would imply that if $y_n \to y_0$, then $T^{-1}y_n = x_n \to T^{-1}y_0$. A contradiction, since $T^{-1}$ was assumed to be discontinuous.
You have already assumed $(T^{-1}(y_n))=(x_n)\rightarrow x_0=T^{-1}(y_0)$. That’s why it looks that $T^{-1}$ is continuous.
What you have to do is, take an arbitrary sequence $y_n\rightarrow y$ and prove that $T^{-1}(y_n)\rightarrow T^{-1}(y)$.
How to use compactness of $X$? Remember that, as $X$ is compact, every sequence has convergent subsequence. From $y_n\rightarrow y$ you can get a sequence $(x_n)$ in $ X$ with $f(x_n)=y_n$ (because of surjective property). This has a convergent subsequence, can you finish from here?
Another hint : In case you can prove $(x_n)$ is Cauchy, then you are done. A Cauchy sequence is convergent if it has a convergent subsequence. By above observation, it is clear that it has convergent subsequence. Showing that Cauchy, and using the injective property, you will see that $(x_n)\rightarrow x$. Thus $T^{-1}$ is continuous.
As $T$ is continuous, $x_{n_k}\rightarrow x_0$ which imply $T(x_{n_k})\rightarrow T(x_0)$; as $T(x_{n_k})=y_{n_k}\rightarrow y$, uniqueness of limits says that $T(x_0)=y_0$. This says there exists a subsequence of $(x_n)$ that converge to inverse image of $y_0$. How do you see whole sequence converge?