Duplicate each layer (Right click on the layer name > duplicate layer). This does not create any additional data. It simply loads the same source data into the project again.
Change the style of the original layers to the red line only.
Move both duplicate layers underneath the original layers in the layer panel. Set the style of the duplicate layers to the large purple line only.