You need to choose one goal and stick with it for at least a few months.
Build muscle/gain weight = 500kcal over maintenance/day would equal around 1lb gain a week. Some fat will be added while gaining muscle but as long as you don't eat too much over maintenance requirements it won't be too much.
Opposite for weight loss. -500kcal/day equals 1lb weight loss per week.
BTW the reason this math works is 3500kcal=1lb.
Oh and you didn't lose 4kg of fat in a week. The liver cannot breakdown that much fat in a week. 1kg at most. But when you first start a "diet" for weight loss you will lose a fair amount of water weight if carbs and sodium lowered.
Do not expect over night results and once again stick to a proper diet and training program for you desired results and over a few months you will be happy with your results.
Best of luck