How do I create two shapes with a shared border?
I just started learning Illustrator so I set myself the challenge of a 2 colour triangle.

This is a red triangle with a yellow semi circle placed on a higher layer.
But with a future project in mind, I really wanted to create it like a patchwork - two shapes sharing a border. Like this picture, but with extra tweaking to get the edges to align. 
Tutorials that I have watched so far only demonstrate overlapping shapes on different layers. Am I just thinking about this in the wrong way with my patchwork quilt concept or is there some tool/technique I have yet to discover?
