I don't know why so many people have trouble figuring this out. I think it's because they over think the problem and make it more complicated than it actually is. All it is is simple ON or OFF switching between the switches poles and their throws. This is how you would wire a 3PDT stomp switch to do this.
The three connections across the middle are the 3 poles of the switch. The connections above and below each pole are the throws. If the switch is set to short the first pole to the throw above it then ALL of the poles are connected to the throw above it. When you actuate the switch the connection switches from the pole to the throws below them.
If the input comes into lug 5 (center lug) and continuity is between the pole and the throw above it that means the signal will go out lug 4 and to circuit A's input. The signal will then come out of the circuit and enter the switch thru lug 1 (top left). And since continuity is between the poles and the throws above them the signal will go from lug 1 to lug 2 which is connected to the output jack. Stomp on the switch and the signal going into lug 5 will go to the lug below it which is connected to circuit B's input. The signal then leaves circuit "B" and re-enters the switch at lug 3 (bottom left). And since continuity is between the poles and the throws below them the signal exits the stomp switch thru lug 2 and goes to the output jack.