Steve and I have discussed this very issue, i.e. that of picking up intermediate work at places, especially yards, along the player path. This is particularly important for a "turn" type of freight.
The current program algorithm assumes that all set outs will be in the starting trains and all pick ups will be in the final train. Thus for your turn, the program can possibly pick up cars at B as described, but they would not be for set out along the turn's path. (I say possibly because the randomizer might not select any cars at B, or any other point along the path.)
It is possible to set up an activity with cars starting at A, set out some on the way out, turn and pick up cars at B, then set out more on the way back. I have published at least one AG generated activity which does this (for Shuswap). But all set out cars will originate at A, either in the train or for pick up at A.
As an aside, the path for a turn does not have to include the turning wye, although it can. You could simply design a path with a single reverse point. If the route's track switches are manual, then the player can choose to use the wye -- or not. Even if the route's track switches are not manual, then AG can convert the track switches to manual, and once again the player can choose to use the wye -- or not. In these days of MSTSbin, the ability for the player to move to the trailing engine more or less negates the need to use a wye, especially when using diesel motive power.
Consequently, to actually simulate a turn with this type of work would really require two activities -- one out, one back. The difficulty here is in making the second train an exact duplicate of the ending train from the first activity. Currently this is all but impossible, but Steve has contemplated varioius ways to do it. The MSTS save function is unfortunately not in unicode, which would make it easy, so it might turn out that AG would have to write an ending consist file when it completes an activity, which file could transfer the consist information to the starting train of the next activity. There are some reasons to want this continuing consist for many types of trains, but this solution (the two part train) is not the best for a turn.
So the short answer is that AG currently does not allow for picking up cars at intermediate points and then setting out those intermediate cars along the way. I am hopeful that someday we might see this feature inplemented.