Oviously you had the outer shape ready when you tried to draw the inner shape starting from point 1. and stopped at point2. Your problem = 1 and 2 are perfectly on the curve of the outer shape, but you cannot get fill of the inner shape to exactly fit to the original curve of the outer shape.
Your original goal can be read "join paths to make branches". It's not solvable in Illustrator. Paths do not have branches.
Solve the fit and color problem otherwise:
- Select all
- take the shape builder tool and
- click the areas that you want to be separately fillable.
The tool builds exactly fitting closed shapes for you:

In the left the bigger area is just clicked with the shape builder tool. In the right both have got their fills with ordinary fill color selection.
The endpoints 1 and 2 need not to be exactly on the curve, they can be more to left, the tool works also with crossings. You must manually remove the remnants.
Here all were selected, the inner shape interior only is clicked with the shape builder, the areas are colored and finally all are moved apart only to show what we have:

The shape builder tool separated the clicked area from the already closed outer shape.
You may have a reason to keep the outer shape intact (transparency, need to make copies later). Then make a copy before building the shapes. Learn to use the layers panel to control what is selected and what's not.