Posting this for a friend, hoping to get some feedback from any experts

so, my friend accumulated too many points and got suspended for 3 months... Then when he was about 3/4 done his suspension, he got caught driving

so, they took away his liscence and further suspended him until his court date to figure out what they were going to do about his liscence. On the day of the court he showed up and the judge said they didnt have anything from his file and pretty much they screwed up, so they gave him back his liscence... THENNNN about 3 weeks ago he gets a mail saying that he has to go to court again about his suspension

Are they allowed to do this? He has signed papers on the day he went to court where they concluded they messeded up and messed up his file... I honestly dont think they can give back his liscence and ask to take it back when it was their fault they screwed up in the first place... Any advice on what he should do and whats could possibly happen to him? Thanks in advance