Let’s determine $ \Pr(A) $
A occurs when $a_1$ is odd. There are 3 odd numbers in the set ${1,2,3,4,5}$, so there are 3 ways for $a_1$ to be odd.
Therefore, $ \Pr(A) = \frac{3}{5} $
Let’s determine $ \Pr(B) $
B occurs when $a_5$ is even. There are 2 even numbers in the set ${1,2,3,4,5}$, so there are 2 ways for $a_5$ to be even.
Therefore, $ \Pr(B) = \frac{2}{5} $
Let’s determine $ \Pr(A \cap B) $
$A \cap B$ occurs when $a_1$ is odd and $a_5$ is even.
We choose 1 of the 3 odd numbers for $a_1$: $\binom{3}{1} = 3$.
We choose 1 of the 2 even numbers for $a_5$: $\binom{2}{1} = 2$.
Therefore, $|A \cap B| = 3 \cdot 2 = 6$.
Therefore, $ \Pr(A \cap B) = \frac{6}{5!} = \frac{1}{20} $
Profit
Check if $A$ and $B$ are independent.
$ \Pr(A \cap B) = \Pr(A) \cdot \Pr(B) $
$ \frac{1}{20} = \frac{3}{5} \cdot \frac{2}{5} $
$ \frac{1}{20} = \frac{6}{25} $
Since $ \frac{1}{20} \neq \frac{6}{25} $, $A$ and $B$ are not independent.