How to join two objects with different color
Multiple possibilities:

OR: Import your (I guess svg) X object as 3 objects instead of 2. In Illustrator, you can use the "Pathfinder" panel to slice 2 objects in 3 objects.

OR: Dirty fix: bring the red part slightly closer to the camera.

After one of these fixes, you can join both objects (ctrl j) in Blender and extrude them as 1 object.