Since it considers the possibility of the topologies being same , I assume the underlying set is the same(Correct me if I'm wrong). So let $X$ be our set and $\tau_1$ and $\tau_2$ are the two topologies that are comparable. So without loss of generality I can assume that $\tau_1 \subseteq \tau_2$ and under both these topologies the space $X$ is both compact and hausdorff. So now I have to prove that $\tau_1 = \tau_2$. It suffices to show that $\tau_2 \subseteq \tau_1.$
Choose any arbitrary open set $U$ from $\tau_2.$ To show this is also open in $\tau_1.$ By compactness of $\tau_1$, $U$ has an open cover satisfying $$U\subset \bigcup_{k=1}^{k=n}V_k $$ where $V_k's$ are open sets in $\tau_1$.If not a proper subset then $U$ is already open in $\tau_1.$ So let's assume it is proper subset.
Then there exists a point $v_1$ in the RHS set that is not in $U$.By Hausdorff compactness we can find open sets $$A_1\cap B_1=\Phi$$ such that $$U\subset A_1 \\\text{and}\\ v_1\in B_1.$$ Now $$ \bigcup_{k=1}^{k=n}(V_k\cap A_1)=W_1$$ is the new finite open cover of $U.$ If this is also not equal then we will find anothe $v_2$ with similar situation and this process goes on. Since the $W_i's$ always contain the $U$ and cannot be infinitely small so this process has to stop at one point and that is when we have arrived at an equation like $$U=\bigcup_{k=1}^{k=n}C_k$$ and $U$ is proved to be an open set in $\tau_1.$
Is this proof correct $?$ Please point out if there are mistakes and also tell how to correct those. I think I need to show that the process should stop after finite steps because infinite intersection of open sets may not be open but I do not know how to.
Thanks.