Question about building a query

I want to filter an train station which has an river in the radius of 10m and the train station also has a school which is in the radius of 500m. Is there any method to build a query to filter the results?

Many Thanks

Yes, see for hints