Concept:
The game ends when a player obtains:
\[
\text{Prime on one die and Composite on the other die}.
\]
Since the throws are independent, we first find the probability of success in a single turn and then use a geometric probability model.
Step 1: Find the probability of success in one throw.
On a die,
\[
\text{Prime numbers}=\{2,3,5\}
\]
so the number of prime outcomes is
\[
3.
\]
The composite numbers are
\[
\{4,6\}
\]
so the number of composite outcomes is
\[
2.
\]
A successful throw occurs when:
\[
(\text{Prime},\text{Composite})
\]
or
\[
(\text{Composite},\text{Prime}).
\]
Hence,
\[
\text{Favourable outcomes}
=
(3\times2)+(2\times3)
=
12.
\]
Total outcomes when two dice are thrown:
\[
36.
\]
Therefore,
\[
p=P(\text{success})
=
\frac{12}{36}
=
\frac13.
\]
Thus,
\[
q=P(\text{failure})
=
1-\frac13
=
\frac23.
\]
Step 2: Find the probability that \(B\) wins.
\(B\) wins in the following mutually exclusive ways:
\[
\text{A fails, B succeeds}
\]
or
\[
\text{A fails, B fails, A fails, B succeeds}
\]
or
\[
\text{A fails, B fails, A fails, B fails, A fails, B succeeds},
\]
and so on.
Therefore,
\[
P(B)
=
qp+q^3p+q^5p+\cdots.
\]
Substituting
\[
p=\frac13,
\qquad
q=\frac23,
\]
we get
\[
P(B)
=
\frac23\cdot\frac13
\left[
1+\left(\frac23\right)^2+\left(\frac23\right)^4+\cdots
\right].
\]
\[
=
\frac29
\left[
\frac{1}{1-\frac49}
\right].
\]
\[
=
\frac29\cdot\frac95.
\]
\[
=
\frac25.
\]
Step 3: Write the final answer.
\[
\boxed{\frac25}
\]