Equations with two rational expressions