There are going to be a few problems with the query as you have it,
SELECT * FROM lugares, related WHERE lugares.placeid = related.relatedid
is going to return columns with the same name (e.g lugares.the_geom and related.the_geom will both be just, the_geom). This is an issue that will make a lot of things not work right. Try a sanity check version,
SELECT ug.cartodb_id FROM lugares ug, related re WHERE ug.placeid = re.relatedid LIMIT 1
From that, you should get back a single row, with a single column, cartodb_id. IF you don't get anything, my guess is that your data do not in fact match up. If it does work, start adding columns explicitly by tablename.name, doing the '*' shorthand isn't going to work well for joins in CartoDB due to shared column names. So in the end, your query might be,
SELECT ug.cartodb_id, ug.the_geom, ug.the_geom_webmercator, re.relatedid
FROM lugares ug, related re WHERE ug.placeid = re.relatedid
If you are running this via CartoDB.js or through the API, double check the error, perhaps one of your tables is set to private.