The later V8s tend to be noisy. Find a BMW specialist for a diagnosis.
It goes w/o saying that you should have paid for a pre-purchase inspection. Sounds like that thing was rid hard, and put away wet.
Hope you got it cheap.
Ed in San Jose '97 540i 6 speed aspensilber over aubergine leather. Build date 3/97. Golden Gate Chapter BMW CCA Nr 62319.