These two sentences have exactly the same meaning and are both right. The second sentence is a simplified version of the first sentence, which is more commonly used in real Japanese conversation than the first sentence.
Where is the library?
note:
The first floor says "where is the library", but it's not written like this ~
Where is the library? It should be said: どこにがぁりますか.