Here we go:
{% set state = craft.categories.group('locations').level(1).title(entry.title).one() %}
{% set solution = craft.categories.group('institutionSolutions').title(entry.parent.title).one() %}
{% set entries = craft.entries.section('institutions').relatedTo('and', state, solution).limit(4) %}
{% for entry in entries %}
{{ entry.title }}
{% endfor %}
The following code does work as expected in Craft 2. According to the docs in Craft 3 we have to use the array brackets. So this
{% set entries = craft.entries.section('institutions').relatedTo('and', state, solution).limit(4) %}
will become to this
{% set entries = craft.entries.section('institutions').relatedTo(['and', state, solution).limit(4) %}
as a result I see the following message:
array_merge(): Argument #2 is not an array
What am I doing wrong? :(