How do I get the molarity of solution 1 given volume 1, molarity 2, and volume 2?
The reaction that occurs: H+ + OH- --> H2O

When you multiply the volume of HCl by the molarity of HCl you get the total amount of moles of H+ that reacted (mol/L x L = mol).
This means that the same amount of OH- was needed for the reaction (1:1). 
Volume of NaOH is known and thus yields the answer.