How do I do routing for something like {city}/pricing, {city}/how-it-works, etc. while loading the same template and dataset?
Is the problem you're not getting the segment from the URL?

{% set locationSlugInUrl = craft.request.getSegment(1) %} or {% set locationSlugInUrl = craft.request.firstSegment %} should do that for you.

Or you're not getting the entry? In which case you need to either specify the template in that section's settings or do something like {% set entry = craft.entries.section('pricing').first %} or whatever the section slug is (assuming it's a single).

And what kind of field is entry.pricingPlans? If it is a matrix field, what type of field is plan.location?