I am given the following interaction, $$\pi^-+p\rightarrow \pi^++\pi^-+n,$$ and asked to draw the Feynman (quark flow diagram). First, as baryon number and quark flavors are all conserved, I deduced that this must be a strong interaction, with pair-production of $d\bar{d}$. That is, $$d\bar{u}+uud\rightarrow u\bar{d}+d\bar{u}+udd,$$ is the quark composition of the interaction.
From what I can deduce then, the $\pi^-$ remains as is (i.e. $d\bar{u}\rightarrow d\bar{u}$), while the proton follows the interaction, $$uud\rightarrow u\bar{d}+udd,$$ with the $d\bar{d}$ pair-production, which would be diagrammatically represented by the following Feynman diagram.
While I'm sure the Feynman diagram is correct for the reaction, $p\rightarrow \pi^++n$, I'm not sure whether or not adding a $\pi^-$ in both initial and final states as given in the question itself would change the quark flow.