I'm trying to make a bigger triangle by merging 2 smaller ones, but I get these strange overlapping corners on the top. What can I do differently to get perfect corners?
Attaching an image to illustrate this issue.
This is a result of your stroke alignment set to center and miter joins.
In the Stroke options panel, there is a "Limit" value (short for miter limit). Setting this to 0 will remove the "strange object parts".
To add the desired sharp corners back in, add a third border triangle: