Car accident.

On 23.08.18 I am on my way to home from office on around 8:30 P.m. sudden a old man on bicycle came in front of my car and than the accident happens.After that i took that old man to the hospital and pay for his treatment around 2500/- after that the hospital people ask me to call the pcr because its a accident case so i called the pcr . after that the hospital people ask me to call ambulance because the said that he got injuries in head so he need to get CT scan. so i called 108 and transferred him to government hospital. next day he got discharged from hospital with normal reports but after two days Police people called me and said they filed fir against me on IPC 279 & 337 so i have to go to police station with my car so i go to there. they impound my car and ask me to go to court to get my car back.in between this i visit to old man home and give me in written that that was his fault not mine and he did not want any legal action and he is thankful to me because i took him to the hospital.so i filled a petition in court to get my car back. now the police person asking my financial details and said that they have file a medical claim on behalf of that old person(but the old person said that he did not need anything) now i am fed-up with all these thing 1. I paid 2500 for that old person 2. I Paid 3000 to IO for making file of my arrest & bail 3. I Paid 2000 to lawyer for filing petition 4. I give 2000 to the old man for medicine and fruits(because he was a old and poor person almost age of my father) Anyone please help me to get out of this