An American writer has to learn the quirks of Rio de Janeiro’s people after moving to the Brazilian city.