The simple approach.
All you need to agree is what is the status quo at the end of the first part, which, incidentally, will be the status quo at the beginning of the second part.
It is like a journey in which you take a coincidence somewhere. You need to be at a certain place at a certain time in order to continue. Similarly, define where characters are, what they are doing, what they know. The first part of the book should describe how they got there. The second part of the book should deal with where they go from there. How you organize the text within each section is up to you.
A less simple approach.
Each of you can write their section as they please, you could make whatever assumptions you like about the plot prior to your section of the story. Your friend can similarly decide to take whatever course they wish for their part of the story.
Once you are done, you can sit together and write a few more chapters to bridge between the end point of one section and the beginning of the next. This is actually quite fun and it may require some good creative thinking.
An even less simple approach.
Both of you write a very skinny draft, just outlining the main story. Even a summary of different scenes should suffice. You should mark details that you are aware of and that occur during each scene in this draft. These details may need to be known across the two sections of the book. After this, you write a second, longer draft of the two sections. Again, make sure you exchange every detail of lore, or character characterization that you have added to make your section consistent: the other writer may need to reference them in their section.
A third draft is probably going to be needed, but beyond that, it is just revisions.