To answer this question, you have to sum over all possible paths the ant can take, and get the duration of that path, multiplied by the probability of taking that path. That is,
$$
E[T] = \sum_{\text{path} \in \text{possible paths}} p(\text{path}) T(\text{path})
$$
Every possible path takes Passage $A$ only once, but can take passages $B$ and $C$ any number of times, in any permutation. So possible paths can be $A$, $BA$, $BBCCA$, $BCCBA$, etc.
Suppose the probabilities of choosing passages $A,$ $B,$ and $C,$ are $p_a$, $p_b$, and $p_c$ respectively. Then, for example, the probability of taking path $CBBCCA$ is $p_a p_b^2 p_c^3.$ And, because there are ${5 \choose 2} = 10$ ways of taking $B$ twice and $C$ three times, the contribution of the expected path time given by the possibility of 3 $C$s and 2 $B$s is $10 p_a p_b^2 p_c^3 (T_a + 2 T_b + 3 T_c)$, where $T_a$, $T_b$, and $T_c$ are the path times of each passage respectively.
The above gives the contribution to the expected time for taking two $B$s and three $C$s before $A$. But in general, you have to sum over the expected time contribution of all possible combinations of paths $B$ and $C$ before $A$ I'll do that below, but I suggest you stop here and try it yourself first.
SPOILER
In general, the ant can take a non-$A$ passage any number of times between zero and infinity before taking passage $A$, and for that number of times, it can be any combination of passages $B$ and $C$. So, to get the expected path time, we sum up the contribution of all passage possibilities, multiplied by their time, which looks like,
$$
E[T] = T_a + p_a \sum_{n=0}^\infty \sum_{i=0}^n {n \choose i} p_b^i p_c^{n-i} [i T_b + (n-i) T_c].
$$
These sums can be evaluated. Using the Binomial theorem and taking the derivative, you can show that,
$$
\sum_{i=0}^n i {n \choose i} x^i y^{n-i} = n x (x+y)^{n-1}
$$
and
$$
\sum_{i=0}^n (n-i) {n \choose i} x^i y^{n-i} = n y (x+y)^{n-1}.
$$
Using these identities, we get
$$
E[T] = T_a + p_a (p_b T_b + p_c T_c) \sum_{n=0}^\infty n (p_b + p_c)^{n-1}.
$$
Taking the derivative of the sum of the famous geometric series, you can show that, for $|x| < 1$,
$$
\sum_{n=0}^\infty n x^{n-1} = \frac{1}{(1 - x)^2}.
$$
Noting that $1 - (p_b + p_c) = p_a$, we get,
$$
E[T] = T_a + \frac{1}{p_a} (T_b p_b + T_c p_c).
$$
If we take $p_a = p_b = p_c = 1/3$ and your values for the times, we get $E[T] = T_a + T_b + T_c$ which is 27 minutes.