Show that it is a stopping time

My task is to describe the following stopping time formally and to prove that it is indeed a stopping time.

Let $$A\in \mathcal{B}(\mathbb{R})$$ be a fixed set. $$(X_t)_{t\ge 0}$$ hits A for the first time, leaves A again and hits A for the second time.

I defined the stopping time $$\nu = min \{ t\in \mathbb{N} | \exists \tau_1, \tau_2 < t \text{ such that } X_{\tau_1} \in A, X_{\tau_2} \notin A, X_t \in A \}$$, where $$min\emptyset := \infty$$

In order to proof, that it is indeed a stopping time I rewrote $$\nu$$:

$$\{\nu=t\} = \cap_{n=0}^{\tau_1 - 1} \{X_n \notin A\} \cap_{n = \tau_1}^{\tau_2 - 1} \{X_n \in A \} \cap_{n = \tau_2}^{t - 1} \{X_n \notin A \} \cap \{ X_t \in A\}$$,

which is "obviously" in $$\mathcal{F}^X \subset \mathcal{F}_t$$ (the filtration).

My questions are:

1. Is this a valid definition of a stopping time?
2. Am I allowed to rewrite the stopping time in terms of the parameters $$\tau_1, \tau_2$$?

Don't forget the quantifiers on $$\tau_1$$ and $$\tau_2$$ in your definition of $$\nu$$. Taking them into account you'll have $$\{\nu=t\}=\cup_{\tau_1=0}^{t-2}\cup_{\tau_2=\tau_1+1}^{t-1}\left[\cap_{n=0}^{\tau_1 - 1} \{X_n \notin A\} \cap_{n = \tau_1}^{\tau_2 - 1} \{X_n \in A \} \cap_{n = \tau_2}^{t - 1} \{X_n \notin A \} \cap \{ X_t \in A\}\right].$$ Otherwise, it looks okay.
You could also "modularize" things by checking that if $$S$$ is a stopping time then so is $$T(A,S):=\min\{n>S:X_n\in A\}$$. Your stopping time is the two-fold iteration of this construction: $$\nu=T(A,T(A^c,T(A))),$$ where $$T(A)$$ is just the first time to hit $$A$$.