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.
This is not correct. There is no reason that the sets $A_1$ and $B_1$ that you claim to exist must exist. For instance, imagine $X=[0,1]$, $\tau_1$ is the usual topology, and $U=X\setminus \{v_1\}$. I also don't at all follow why your process would need to end after finitely many steps.
As a hint that you're barking up the wrong tree, you haven't actually used compactness anywhere. For any topology and any $U$, you could just take $n=1$ and $V_1=X$. The power of compactness is not that there exists some finite open cover (which is trivial, you can always just take the whole space), it's that no matter what open cover you start with you can find finitely many of the sets which still cover.
I find this question easier to think about in terms of closed sets instead of open sets. Try proving that any $\tau_2$-closed set must be $\tau_1$-compact, and then use the fact that a compact subset of a Hausdorff space is closed.