randRange( 2, 10 ) randRangeNonZero( -10, 10 ) randRange( 2, 10 ) randRangeNonZero( 2, 10 ) fractionReduce( D - B, A - C )

Solve for x:

Ax + B = Cx + D

x = ( D - B ) / ( A - C )

Subtract Cx from both sides:

(Ax + B) - Cx = (Cx + D) - Cx

A - Cx + B = D

Subtract abs(B) from both sides:

Add abs(B) to both sides:

(A - Cx + B) + -B = D + -B

A - Cx = D - B

Divide both sides by A - C.

\frac{A - Cx}{A - C} = \frac{D - B}{A - C}

Simplify.

x = SOLUTION

Subtract Ax from both sides:

(Ax + B) - Ax = (Cx + D) - Ax

B = C - Ax + D

Subtract abs(D) from both sides:

Add abs(D) to both sides:

B + -D = (C - Ax + D) + -D

B - D = C - Ax

Divide both sides by C - A.

\dfrac{B - D}{C - A} = \dfrac{C - Ax}{C - A}

Simplify.

SOLUTION = x