Hot take (having taught algebra to disadvantaged youth in a previous life): a lot of kids who struggle with algebra do so because it is taught in a way that assumes a solid grasp of arithmetic. But many kids do not . I've worked with high schoolers who couldn't subtract, and weren't about to learn to, because they are completely burnt out on the concept from having it attempted to be taught to them year after year. B…
Wait, how can algebra not depend on arithmetic? Something simple like x+20=3x+8. The normal way to solve this is just separate terms, but you need to subtract 8 from 20. Is there another way to do this?
If your Q could be restated as: How can a student struggle with one while excelling at the other?
The answer is: When we learn the answer we'll be able to help more dyslexic kids than we are now.
I failed basic 3rd grade math tests for so long they finally quit testing me. Eventually, I was the only one of those kids doing algebra in the 6th grade.
My longish life is loaded with similar discontinuity-of-ability. Adult me obfuscates it so well I rarely experience other people's incredulity. Grade school me could have put that to good use.