(function() { var numbers = randRangeUnique( 5, 12, 3 ); numbers.splice( randRange( 0, 3 ), 0, "x" ); return numbers; })() (function() { if ( numerator1 === "x" ) { return [ numerator2 * denominator1, denominator2 ]; } else if ( numerator2 === "x" ) { return [ numerator1 * denominator2, denominator1 ]; } else if ( denominator1 === "x" ) { return [ numerator1 * denominator2, numerator2 ]; } else { return [ numerator2 * denominator1, numerator1 ]; } })() (function() { if ( numerator1 === "x" ) { return denominator1; } else if ( numerator2 === "x" ) { return denominator2; } else { return "x"; } })() (function() { var hint1Product = function( numerator, denominator ) { if ( denominator === hint1Multiplier ) { return numerator; } else if ( hint1Multiplier === "x" ) { return "\\dfrac{" + numerator + "}{" + denominator + "}x"; } else { return "\\dfrac{" + hint1Multiplier * numerator + "}{" + denominator + "}"; } } return [ hint1Product( numerator1, denominator1 ), hint1Product( numerator2, denominator2 ) ]; })() (function() { if ( denominator1 === "x" ) { return "\\dfrac{" + denominator2 + "}{" + numerator2 + "}"; } else { return "\\dfrac{" + denominator1 + "}{" + numerator1 + "}"; } })() (function() { if ( denominator1 === "x" ) { return [ "\\dfrac{" + solutionNumerator + "}{" + solutionDenominator + "}", "x" ]; } else { return [ "x", "\\dfrac{" + solutionNumerator + "}{" + solutionDenominator + "}" ]; } })()

Multiply both sides by hint1Multiplier

 \color{red}{ hint1Multiplier \times } \dfrac{numerator1}{denominator1} =   \dfrac{numerator2}{denominator2} \color{red}{ \times hint1Multiplier } 

hint1Product1 =  hint1Product2

Multiply both sides by hint2Multiplier

 \color{red}{ hint2Multiplier \times } hint1Product1 =   hint1Product2 \color{red}{ \times hint2Multiplier } 

hint2Product1 =  hint2Product2

x is

= \dfrac{solutionNumerator}{solutionDenominator}.

Solve for x.

\dfrac{numerator1}{denominator1} =  \dfrac{numerator2}{denominator2}

x = solutionNumerator / solutionDenominator