first simple case: $p_+=p_-\equiv p_0$ and $\kappa_+=\kappa_-\equiv \kappa$; then all you need to know is the time $\delta t$ since the last switching event, which has an exponential distribution, hence:
$$p(x,t)=(1-e^{-\kappa t})^{-1}\int_0^t d\delta t\; \kappa e^{-\kappa \delta t}p_0(x,\delta t)$$
now the general case; you'll need to distinguish even from odd number of switching events, and find the distribution $P_{\rm even}(\delta t)$ of the time $\delta t$ since the last switching event, given that there have been an even number of switches in a time $t$, and similarly for an odd number; the a priori probability that there have been an even or odd number of switches is just given by the Poisson distribution (summing over $n$ even or $n$ odd). The integral over $P_{\rm even}(\delta t)p_{+}(x,\delta t)$ and $P_{\rm odd}(\delta t)p_{-}(x,\delta t)$ then gives the full answer.
a bit more explicit, still assuming $\kappa_+=\kappa_-\equiv \kappa$ for simplicity; it is convenient to set the first switching event at time $0$, so that the number of switching events $m=n+1$ in a time $t>0$ is $\geq 1$; the probability $P_{m,t}(\delta t)$ that there have been $m=n+1\geq 1$ switching events in a time $t$, while the last switching event was a time $\delta t\in[0,t)$ ago is given by a slight modification of the Poisson distribution,
$$ P_{m,t}(\delta t)=\frac{1}{(m-1)!}[\kappa(t-\delta t)]^{m-1}\kappa e^{-\kappa t}.$$
summing over all $m=1,2,3,\ldots$ we recover the exponential probability $\sum_{m}P_{m,t}(\delta t)=\kappa\exp(-\kappa\delta t)$ we had before, but now we have to distinguish between even $m$ (= odd $n$) and odd $m$ (= even $n$):
$$P_{\rm even}(\delta t)=\sum_{m=1,3,5}^{\infty}P_{m,t}(\delta t)=\cosh[\kappa(t-\delta t)]\kappa e^{-\kappa t}$$
$$P_{\rm odd}(\delta t)=\sum_{m=2,4,6}^{\infty}P_{m,t}(\delta t)=\sinh[\kappa(t-\delta t)]\kappa e^{-\kappa t}$$
and we're done:
$$p(x,t)=(1-e^{-\kappa t})^{-1}\int_0^t d\delta t\; [P_{\rm even}(\delta t)p_+(x,\delta t)
+P_{\rm odd}(\delta t)p_-(x,\delta t)]$$
$$\quad\quad=(1-e^{-\kappa t})^{-1}\int_0^t d\delta t\; \kappa e^{-\kappa t}\left[\cosh[\kappa(t-\delta t)]p_+(x,\delta t)
+\sinh[\kappa(t-\delta t)]p_-(x,\delta t)\right]$$
if we take $p_+=p_-\equiv p_0$ we recover the earlier result.