The probability of the first head appearing on the \( k \)-th toss is:
\[ P(\text{first head on toss } k) = (1-p)^{k-1} \cdot p \]
This is because the first \( k-1 \) tosses must be tails (probability \( 1-p \)), and the \( k \)-th toss must be heads (probability \( p \)).
Step 2: We need to find the probability that an even number of tosses is required. This corresponds to the sum of probabilities for even values of \( k \) (i.e., \( k = 2, 4, 6, \ldots \)).
Step 3: The total probability of the first head occurring on an even toss is:
\[ P(\text{even toss}) = (1-p)p + (1-p)^3p + (1-p)^5p + \cdots \]
This is an infinite geometric series. The first term is \( (1-p)p \), and the common ratio is \( (1-p)^2 \).
Step 4: The sum of this infinite geometric series is:
\[ P(\text{even toss}) = \frac{(1-p)p}{1 - (1-p)^2} \]
Simplifying the denominator:
\[ 1 - (1-p)^2 = 1 - \left(1 - 2p + p^2\right) = 2p - p^2 \]
Therefore, the probability of an even toss is:
\[ P(\text{even toss}) = \frac{(1-p)p}{2p - p^2} \]
Step 5: We are given that \( P(\text{even toss}) = \frac{2}{5} \). Thus:
\[ \frac{(1-p)p}{2p - p^2} = \frac{2}{5} \]
Step 6: Cross-multiplying and simplifying:
\[ 5(1-p)p = 2(2p - p^2) \] \[ 5p - 5p^2 = 4p - 2p^2 \] \[ 5p - 4p = 5p^2 - 2p^2 \] \[ p = 3p^2 \] \[ 3p^2 - p = 0 \] \[ p(3p-1) = 0 \]
Step 7: Solving for \( p \), we find \( p = 0 \) or \( p = \frac{1}{3} \). Since \( p = 0 \) is not a valid probability, we conclude:
\[ p = \frac{1}{3} \]