Let me denote the probability that that there is an event "first $A$ then $B$" by $P_{AB}$ and let me consider $1-P_{AB}$.

One contribution to $1-P_{AB}$ is that the event $A$ does not happen at all in a time $T$, for a Poisson process that probability is
$$P_0=\exp\left(-\int_0^T P_A(t)\,dt\right).$$
For the remaining contributions the event $A$ happens at least once, denote by $\tau$ the time at which this first happens. A contribution to $1-P_{AB}$ we require a time interval from 0 to $\tau$ where $A$ does not happen, then $A$ happens, and then from $\tau$ to $T$ the event $B$ does not happen. This gives in total
$$1-P_{AB}=P_0+\int_{0}^T \exp\left[-\int_0^\tau P_A(t)\,dt\right]P_A(\tau)\exp\left[-\int_\tau^T P_B(t)\,dt\right]\,d\tau.$$

As a check, let's verify that $P_{AB}=0$ if $P_B(t)$ is identically zero for all times between 0 and $T$. We then have
$$P_{AB}(T)=1-\exp\left(-\int_0^T P_A(t)\,dt\right)-\int_0^T \exp\left[-\int_0^\tau P_A(t)\,dt\right]P_A(\tau)\,d\tau.$$
To see that this is indeed zero, first note that $P_{AB}(0)=0$ and then
$$\frac{d}{dT}P_{AB}(T)=P_A(T)\exp\left(-\int_0^T P_A(t)\,dt\right)-\exp\left(-\int_0^T P_A(t)\,dt\right)P_A(T)=0,$$
so $P_{AB}(T)=0$ for all $T$ if $P_B\equiv 0$.