A + 2B => R
I assume XA refers to XA - the conversion of A.
This is the rate equation: Rate = - d[A]/dt = K[A][ B ]2
- d[A]/dt = - (d/dt)([A]0(1 - XA) = [A]0dXA/dt
From the stoichiometric ratio, [ B ]0XB = 2 [A]0XA
[ B ] = [ B ]0(1 - XB)
K[ A ][ B ]2 = K[A]0(1 - XA)([ B ]0-[ B ]0XB)2 = K[A]0(1 - XA)([ B ]0 - 2[A]0XA)2
[A]0dXA/dt = K[A]0(1 - XA)([ B ]0 - 2[A]0XA)2
dXA/dt = K(1 - XA)([ B ]0 - 2[A]0XA)2
Solving the above ODE will yield the correct reaction profile.