Congrats on starting some exercise with your healthy eating! With a lifestyle change like the one you've done, your body goes through a bit of a shock and will drop a lot of excess water weight (which would be the 10 pounds in 15 days). It's appropriate and recommended to keep losses at 2 lbs per week maximum, unless guided by a doctor.
Realistically you didn't gain 2 lbs, it was probably your body balancing out. Building muscle makes your body retain a bit of water, so don't lose heart! Give it a good few weeks and your body will level out. Also make sure you weigh in first thing in the morning before showering/after using the bathroom. Your weight fluctuates greatly throughout the day and it's best to have a set time to weigh in.