This task can most likely not be completed with the approach you are attempting. It can be accomplished, but I am not going to provide a complete answer, because it would essentially involve reproducing the tutorial you are trying to follow. However, the following information may help you understand better what the tutorial is asking for.
In GIS, we often do two types of queries: attribute queries and spatial queries. An attribute query is where you select certain records based on a nonspatial column, which is what you are trying to do with the first part of your query, "MB_CAT11" ='Residential'
. A spatial query is where you select certain records based on a spatial relationship between the record's geometry (including its location) and geometries of the same or a different dataset. This is the second part of your query, where you are trying to select "areas" (not clear what these areas represent) that are within 500m of parks and transport.
Note that this is fairly straightforward, and can be accomplished, as indicated in the tutorial, by going to the Vector→Spatial Query
menu (but note that Spatial Query is a plugin and therefore this tutorial is presuming, perhaps from earlier instructions, that the plugin is installed and enabled). It can also be accomplished in code, but not in the manner you are attempting. It requires the use of spatial SQL (such as the ST_DWithin()
function).
The tutorial you are trying to complete is perhaps a bit too advanced for a complete beginner. For more information, here are links to other online tutorials that might be at a more introductory level:
I know that linking to outside answers is frowned on GIS.SE, but I don't want to reproduce an entire intro exercise in this answer. I hope you find the links useful.