well i will try my best im not that good in grammer but will tell u
for me i see the first one is grammatically correct cuz the speaker is reporting the speech not aquestion ......
in question we say where was the keys but when reporting we say where the key was
Did u get ma point ?
المفضلات