BMW 525i 2000-2003 has a battery in a trunk on a right side, to change battery ,you should leave your engine running & replace with the other as quick as you can, when you take the battery off ,the car wont go off & you wont need to reset your devices or enter any codes, and you wont make any changes to your central locking system or engine immobilizer.
On 2005 the battery is in trunk on the right hand side
Under hte rear seat on pass side
The battery is on the trunk on the right side. If you need to repair your battery, I would recommend you take a look at these BMW auto repair manuals. I used to buy new details for my car as I did not know that it's possible to repair most of them very cheap. I guess those manuals can save you money and time. They also gave me a better understanding of some technical processes.
Battery is located under the rear seat. grab the corner and lift up. You'll need to enter the radio code for the radio to work as well as set time/date.