In order to match the field_id with a particular value you'll have to match them in pairs (field_id AND value). Then you will have to count the amount of matches.
SELECT user_id FROM wp_bp_xprofile_data t
WHERE (field_id = 270 AND value = 'Gender') OR
(field_id = 354 AND value = 'City')
GROUP BY user_id
HAVING COUNT(*) = 2
Fiddle here.
One thing that results from applying the Entity-Attribute-Value (EAV) model is that your tables are not normalized then you should make sure that you don't have more than one field_id for a given user_id with the same value.
A workaround for this would be to query:
HAVING COUNT(distinct field_id) = 2
But this won't solve the data issue, of course.
Edit:
Given your question update... in order to return the additional data probably putting the conditions in the having clause might be better:
SELECT
user_id,
max(case when field_id = 270 then value end) nameOfPerson,
max(case when field_id = 354 then value end) cityName
FROM wp_bp_xprofile_data t
GROUP BY user_id
HAVING SUM(
(field_id = 270 AND value = 'Gender') +
(field_id = 354 AND value = 'City')
) = 2
Fiddle here.