@Kumirei is right. In the case of the example question, あります is more formal, though they’re both polite (ある and だ are their informal versions).
I should note that generally speaking though, they serve different functions. あります is typically used to relay location information (“the book is on the shelf”) or the fact of something existing (e.g.:“There are 3 grocery stores in my neighborhood”).
です is usually used for a wide variety of phrasal expressions (e.g.: ____はずです, ___そうです, ___といいです), to attach adjectives onto things(e.g.:“That dog is big”), and to name/identify things (e.g.: “That tall guy is Steve”). Of the two, です/だ is way more flexible, so if you’re not sure it’s あります, you’re almost always probably better off with です.
hope that helps!