$\WhoGoesFirst(k):$
$\quad \mathbf{if}\ k \geq 1\ \mathbf{then}$
$\quad \quad \text{Alexa rolls the die, let a be the result}$
$\quad \quad \text{May rolls the die, let m be the result}$
$\quad \quad \mathbf{if}\ a > m\ \mathbf{then}$
$\quad \quad \quad \text{print Alexa goes first}$
$\quad \quad \quad \mathbf{return}\ k$
$\quad \quad \mathbf{endif}$
$\quad \quad \mathbf{if}\ a < m\ \mathbf{then}$
$\quad \quad \quad \text{print May goes first}$
$\quad \quad \quad \mathbf{return}\ k$
$\quad \quad \mathbf{endif}$
$\quad \quad \mathbf{if}\ a = m\ \mathbf{then}$
$\quad \quad \quad \WhoGoesFirst(k + 1)$
$\quad \quad \mathbf{endif}$
Let’s just think about this logically
$k$ increments when the dice rolls are the same(no die is greater than the other)
No die is greater than the other when the dice rolls are the same
The probability of returning k or having 2 different rolls is $ \frac{30}{36} $
Geometric distribution rule states that the expected value is 1/p, where p = probability of the event.
$ p = \frac{30}{36} $
$ \mathbb{E}(X) = \frac{1}{p} $
$ \mathbb{E}(X) = \frac{1}{ \frac{30}{36}} $
$ \mathbb{E}(X) = \frac{36}{30} $
$ \mathbb{E}(X) = \frac{6}{5} $