Solving equations algebraically by Substitution Method