The word algebra is a Latin variant of the Arabic word al-jabr. This came from the title of a book, Hidab al-jabr wal-muqubala, written in Baghdad about 825 A.D. by the Arab mathematician Mohammed ibn-Musa al-Khowarizmi.
The words jabr (JAH-ber) and muqubalah (moo-KAH-ba-lah) were used by al-Khowarizmi to designate two basic operations in solving equations. Jabr was to transpose subtracted terms to the other side of the equation. Muqubalah was to cancel like terms on opposite sides of the equation. In fact, the title has been translated to mean "science of restoration (or reunion) and opposition" or "science of transposition and cancellation" and "The Book of Completion and Cancellation" or "The Book of Restoration and Balancing."
Jabr is used in the step where x - 2 = 12 becomes x = 14. The left-side of the first equation, where x is lessened by 2, is "restored" or "completed" back to x in the second equation.
Muqabalah takes us from x + y = y + 7 to x = 7 by "cancelling" or "balancing" the two sides of the equation.
Eventually the muqabalah was left behind, and this type of math became known as algebra in many languages.
It is interesting to note that the word al-jabr used non-mathematically made its way into Europe through the Moors of Spain. There an algebrista is a bonesetter, or "restorer" of bones. A barber of medieval times called himself an algebrista since barbers often did bone-setting and bloodletting on the side. Hence the red and white striped barber poles of today.