The key distinction between high-school math and the math used in cryptography is that cryptography is discrete. That is, in high school math your answer could be 8.56, 8.57, 8.565, 8.564, etc, with infinite granularity between any two values. You also have continuity, which means that you can find always find some distance such that within that distance for the inputs the outputs are always within a certain (arbitrarily small) range. Thus, even if you algebraic efforts fail, you can always apply methods like Newtonian approximation and get an answer in the end.
Discrete math is different. Consider the following problem:
Find integers x and y such that 120x - 23y = 1.
How would you solve that? With "normal" methods, you can't. It looks like an underdetermined system (and it is), and the requirement to have integers means that you can't just do the old trick of fixing a random x and finding y to match it. You do not get the benefits of continuity because there is no granularity. The answer is (-9,47), but in order to do that you need to do a series of reduction steps in the form of the
Extended Euclidean AlgorithmNow, consider a second problem:
Find integer x such that the last ten digits of 3^x are 3147595467
This one is harder. You have to use tricks like the
Chinese Remainder Theorem, and even then a lot of computational effort is required.
Now for the really hard problem:
Find integers x,y such that x * y = 8340368351292114898806993735182512787836108384416112375142633921308502660867470
5717333990587055137541907379907772161559852062233059312453755072535705574833391
32157327857301030605921850352045823680907
We have some shortcuts to help you here, but even then the problem is currently just on the fringes of computability. Add a few more digits and it becomes intractable. The reason is that the hardness of the problem does not come from simplifying a complex equation or finding roots to a polynomial; rather, it comes from the fact that the answers have to be integers, and so you're dealing with a world that is discrete. Thus, you can easily find many instances where the expression x*y - n, where n is the above number, come
very very close to zero, but those cases are all useless in helping you find the (unique up to swapping x and y and negating both) solution to the above expression.