Did the Indians invent algebra which was taken by Arabs and introduced by them to Europe as their own invention?
Or did the Arabs invent algebra?
According to the relevant Wikipedia aritcle
The roots of algebra can be traced to the ancient Babylonians
whereas the word "Algebra" that is used today to describe this branch of mathematics originates from the arabic language
Algebra (from Arabic al-jebr meaning "reunion of broken parts")
As it stated in the article, other civilizations of the time (like Greeks, Egyptians and Chinese), used geometric method to solve equations, in contrast to the arithmetic methods ob the Babylonians that led to the subsequent development of this branch.
At the cost of risking adventurous eurocentrism, I would point out that the meaning of the term "algebra" is ambiguous but if it refers to symbolic notation used in mathematics then its creator is certainly Vieta (1540-1603) of France.