Hey there! I'm happy to help!
The solution that led to Missouri becoming a state is conveniently known as the Missouri Compromise. Missouri would join the country as a slave state, but they agreed that no new slave states could be created above the Missouri Compromise line and that Maine had to be admitted as a free state to hold the balance between slave and free states.
I hope that this helps! Have a wonderful day! :D