Translation:Which floor do you live on?
Ending a sentence with a preposition can be natural in English and is often preferred. The only people who oppose ending sentences with prepositions in English are those mistakenly laboring under a Victorian-era grammar "rule" which was due to the influence of Latin. However, great writers in English have often ended sentences with prepositions, before and since the Victorian era, and English is not a Latin-derived language anyway.
楼 can be a noun or a measure word and 层 is just a measure word.
fifth floor (noun/place) = 五楼
five floors (measure or count) = 五层
你住在几楼 = Which floor do you live on?
我住在五楼 = I live on the fifth floor.
你家有几层(楼) = How many floors does your house have?
我家有三层(楼) = My house has three floors.