How does the L239D IC H-bridge work?
The schematic in figure 5 can be redrawn to look like this: -

I've made a mirror image of figure 5 to show the transistors that make up the H-bridge. I've called them Q1 to Q4 to coincide with the transistor names in your final picture.
So if the left-side output was pin 3, Q1 would be activated when pin 2 goes high. The right-side output is therefore pin 6 and Q4 is activated when pin 6 is low.
BTW, these devices are pretty poor these days. See this assassination of the device in terms of poor efficiency and poor ability to drive loads.