I'm assuming that this is a modular course in which case, I can't see the cross-country flight counting for both.
In order to enrol on commercial ground studies, one must hold a PPL and, in order to undertake a commercial flying course, one must have completed and passed all the theoretical exams. The flying course is a regulated course and certain "tasks" must be completed within that course. I shouldn't think that a cross-country flight carried out for one, would be valid for another.
Whoever it was at the school who suggested this course of action, ask them for a reference. I can't see the CAA agreeing.
Cheers
Whirls