Problem: For any topological space $X$, $\Delta: X\rightarrow X\times X$ , defined by $\Delta(x)=(x,x)$ is continuous.
My Attempt: Let $U$ be open in $X$. Then $(\pi_1 \circ \Delta)^{-1}(U)=\Delta^{-1}(\pi_1^{-1}(U))$ $=$ $\Delta^{-1}(U\times X)$ $=$ $U$ which is open in X. Hence $\pi_1 \circ \Delta$ is continuous.
I will show that $\pi_2 \circ \Delta$ is continuous. Let $V$ be open in $X$. Then $(\pi_2 \circ \Delta)^{-1}(V)=$ $\Delta^{-1}(\pi_2^{-1}(V))$ $=$ $\Delta^{-1}(X\times V)$ $=$ $V$ , which is open and thus $\pi_2 \circ \Delta$ is continuous. Since $\pi_i \circ \Delta$ is continuous for $i=1,2$, $\Delta$ is continuous.
Note: $x\in \Delta^{-1}(X \times V)$ $\iff$ $x\in X$ and $\Delta(x)\in X\times V$ $\iff$ $(x,x)\in V$ $\iff$ $x\in V$.
Is my attempt correct?
You seem to know and want to apply the theorem
This is a fine idea, but just note that $$\forall x \in X: (\pi_1 \circ \Delta)(x)=\pi_1(\Delta(x)) = \pi(x,x)=x \text{ so } \pi_1 \circ \Delta = 1_X$$
where $1_X: X \to X$ is the identity map on $X$ and similarly $\pi_2 \circ \Delta= 1_X$ as well and the identity maps are always continuous. Done.
Don't reprove that identity maps are continuous, just use it.
As an alternative: let $U \times V$ (so $U,V$ open in $X$) be a basic open set of $X \times X$, and note that
$$\Delta^{-1}[U \times V]=\{x \in X: (x,x) \in U \times V\}=U \cap V$$ which is open as a finite intersection of open sets, so the inverse images of basic open subsets are open in $X$ and this implies (standard theorem) that $\Delta$ is continuous.