The ancient Greeks are famed for their contributions to mathematics, however algebra would not be invented for roughly another 1500 years. How did the Ancient Greeks solve complex math problems if they did not have the ability to use variables in equations ? Pythagorean theorem for example, as it is taught in schools, today uses basic algebra to find the length of the sides of a triangle. If you have two values you can easily solve for the 3rd , however if the Greeks did not have an understanding of variables, how was it possible they could solve such an equation ?
More can always be said on the matter, so if anyone wants to contribute further regarding Greek mathematics, don't let this post stop you! For the meantime, OP, you may be interested in this previous post on exactly this matter, ably addressed by u/KiwiHellenist and u/restricteddata. (Spoiler alert: Geometry is a hell of a drug.)