Solution (source code)

= Solution

A <weakly dominant strategy> must be a <best response> to either opponent action. For X this requires
$$
\frac{2t}{3}-P\ge0,\qquad\frac{t-P}{2}\ge0.
$$
The first is stronger because $t>0$. Thus
$$
\boxed{\text{X: }b\text{ is weakly dominant iff }0<P\le\frac{2n}{3(n+3)}.}
$$
For Y the comparisons are $t/3-P\ge0$ and $(t-P)/2\ge0$, giving
$$
\boxed{\text{Y: }b\text{ is weakly dominant iff }0<P\le\frac{n}{3(n+3)}.}
$$
Below each upper endpoint the corresponding <strategy> is strictly better against both opponent actions; at the endpoint one comparison ties and the other is strict. Thus the answers also satisfy the convention that weak dominance requires a strict advantage somewhere. Since <expected payoffs> are linear in the opponent's mixing <probability>, checking both opponent <pure strategies> suffices for every opponent <mixed strategy>.