As it is evident, the person has been granted a bail and the police officers at the station where he is been jailed are refusing to let him out with stupid reasons. I presume they want some money and that's why they are stalling. But however, you should not be supporting corruption or encouraging it.
You can file a writ of mandamus in the High Court. The writ is a sort of an order asking the public authority to do its work. It will be a directive which the police cannot shun easily. A writ of hebeas corpus can be also filed since the detention is mala fide or intentionally abusive.
In addition you can even complain to the Commissioner of Police of the particular city. And file a legal complaint against the police officers.