Considering that you are using the same fare system, only the first leg given that your transfer is, within the transfer_duration period.

In the current allows to describe linear relations with respect to distance traveled, but not degenerative relations. The latter (Dutch Railways) we did implement with a cross-product operation on all stops.