you got a chance if you can actually prove, you were not racing, consider you evidence, and plead not guilty, try to find a lawyer friend of the family, who will help you with your case.
do not be intimidated by the solicitor at your arraignment.
Follow these steps.
1: Find Legal Counsel
2: Obtain Defensive evidence, and consider possible prosecuting evidence
3: Plead not guilty and choose the jury trial (DO NOT CHOOSE A BENCH TRAIL)
Things you should consider. Did he take you both to jail? If not, think about why.
Remember, if your cars have loud exhaust that could sway the balance in your favor.
Was the officer able to catch you on his in dash video camera, if not, you have a very strong chance of winning, if he did and you WERE NOT racing you have an even stronger chance.
Do not give in to the system especially if you think your are innocent.