which is why macros like this have the values surrounded by brackets.
#define sqrt(x) (x)*(x)
which would give
(2-5) * (2-5)
= -3 *-3 = 9
Also
why would anyone try to find the square root of a nymber by
multiplying it by itself (because that creates the square of the number not the square root).
Classic pitfall of C.
Just remember, the preprocessor works like an automatic copy-paster.
In your case, every occurrence of the sqrt() macro will be replaced by its definition, updated with the parameters.
One solution is to use parentheses, like guestgulkan already explained.
Another is to use an inline function, or a template function.