I have two animations to draw and fire a pistol. The drawpistol animation (bool) plays and stays at the end as long as right click is held down. The firepistol animation (trigger) plays and returns to drawpistol. The problem is when it returns to drawpistol it plays drawpistol again, when I just need it to return to the end.

Does anyone know how to do this or should I play firepistol a different way?

One solution would be to have an intermediate state, maybe called idleDrawnPistol. So drawPistol transitions to idleDrawnPistol on right click. When firePistol is played, it returns to idleDrawnPistol.
You can then decide if releasing right click while firePistol is playing would wait for firePistol to finish before playing holsterPistol or if it’s smoother to interrupt the firePistol animation and holster immediately. If you have some kind of explosion at the barrel of the gun, it might be better to put that in a separate animation so you can holster immediately and let the explosion play itself out.

Hope that helps, good luck!