What are the distinct address ids of the people?
select distinct address_id from people_addresses
Give the same for the students.
select distinct t1.address_id from people_addresses as t1 join students as t2 on t1.person_id = t2.student_id
Give their cities of addresses too.
select distinct t1.city from addresses as t1 join people_addresses as t2 on t1.address_id = t2.address_id join students as t3 on t2.person_id = t3.student_id