Hi there. Glad to see you're excited with your gym membership.
There's a lot of good information in the stickies in each section of the forum, so I recommend having a read through, it should give you plenty of guidance.
Addressing your goals, good news: In 5 months they should be quite achievable, especially the simple weight loss goals. Issues such as how flat your stomach is can be affected by things like posture, which could, hypothetically, stop you from getting a flat stomach, even if you get to a low bodyfat level. Thanks to lordosis (excessive curve in the lower back) I used to have about 7%BF, 8-pack abs, and an apparently buldging stomach (wasn't actually buldging, but posture caused the appearance of buldging). Just letting you know, so that you don't take flatness as a solid indicator of success. But the decrease in bodyfat and slight increase in muscle mass you'd be looking at is quite achievable.
Know that nutrition comes first. You won't be able to make any consistent changes in body composition without taking care of your nutrition. One of the best things you can do starting out is to keep a food diary in which you record everything you eat over the course of three regular days. Record the food itself and the quantities, as accurately as possible (that'll mean measuring your portions). Then go onto a website such as calorieking.com and enter the details to find out how much protein, fat, carbohydrate and total energy (calories) you're consuming.
You will then want to decrease the average daily consumption by 500kcal, and organise your meals so that you get 150g protein/day (~ 1g/lb bodyweight). You'll need some complex carbohydrates in your diet to keep your energy levels consistent and to fuel your training, and a little bit of fat is actually good for you, so long as you don't go overboard. Eat plenty of vegetables and a moderate amount of fruit, and at least 3 meals per day.
As for your exercise program, a simple 2-3 days/week of resistance training with 3-5 exercises per day should serve you well. Again, there's plenty of good information in the stickies. An absolutely basic template is 1 leg exercise, 1 push (chest/shoulders) and one pull (back/shoulders), which could very simply be squats, bench press and pull ups. You'll find more detail in the stickies.