Report as inappropriate

I have recently upgraded my printer to a dual bowden extruder with a "Y" divider. I need to be able to retract the fillament "A" up to a certain point to be able to extrude fillament "B". Can anyone explain how do I do this in Cura 4 or Slic3r? I think it has something to do with the "tool change" g-code, but If that's not the way it should be done, then can you explain the best method?
I use the Marlin firmware.
I uploaded a photo of the printer, if it helps

Thanks in advance for any help.
(also, sorry about any english mistakes .-.)