So call people BCFM S.
In principle, everyone can live anywhere, so we have this starting situation:
[BCFMS] [BCFMS] [BCFMS] [BCFMS] [BCFMS]
Now you speak
Baker does not live on the top floor.
So we will have
[BCFMS] [BCFMS] [BCFMS] [BCFMS] [CFMS]
Cooper doesn't live on the ground floor.
So, in the end we get:
[BFMS] [BCFMS] [BCFMS] [BCFMS] [CFMS]
Fletcher does not live on the upper or lower floor.
Ookay:
[BMS] [BCFMS] [BCFMS] [BCFMS] [CMS]
Miller lives on a higher floor than Cooper.
So, M cannot be in a lower position than C:
[BS] [BCFS] [BCFMS] [BCFMS] [CMS]
And also, C cannot be on the top floor, because M must be above it:
[BS] [BCFS] [BCFMS] [BCFMS] [MS]
(A): Smith does not live on the floor next to Fletchers.
(B): Fletcher doesn't live on the floor next to Coopers.
Thus, there are no SF, FS, FC or CF on adjacent “drawers” (floors).
And we also know that
(C): live on different floors of a residential building.
According to (C), we have two possible situations: the first floor is B or S
Take the second case (because we know (A) about it)
[S] [BCFS] [BCFMS] [BCFMS] [MS]
According to (A):
[S] [BC] [BCF] [BCF] [M]
So, we also know that M lives above C (the previous step is already right, since we know that M is probably on the top floor):
[S] [BC] [BCF] [BCF] [M]
According to (B), neither F nor C can be on the 3rd floor and under the influence of (C) we ultimately get the only possible permutation due to further reductions (only one person per floor):
[S] [C] [B] [F] [M]
So here is the solution:
Smith, Cooper, Baker, Fletcher, Miller