You will not be able to lose weight and gain muscle at the same time. One requires a calorie defecit the other calorie excess, simple as that. Your main goal is to "save" or preserve muscle you've gained while cutting.
As far as carbs, everyone is different and you need to find the ratio that works good for you. Main thing is to be calorie deficient and eat enough protein. The # of calories you consume is more important than the grams of carbs you consume.