This is just a small post for everyone who has difficulty solving arithmetic (or any other) problems. Instead of trying to work on the problem to solve it, try doing another mindless task. This can be anything from eating, having a shower or even sleeping. This way while you are consciously doing the other mindless tasks, your brain will subconsciously work on the problem and solve it (or at least lead you in the right direction).
This works because you are letting your brain wander around and make connections between all the information stored in your head, some which you might not have noticed whilst you are working on the problem. If you did a task that required you to think about, then your brain will not have a chance to make connections between the information you have stored. This is because your brain will be working to solve the task in hand.
This is why you might have read or heard people tell you to walk away from the problem, go outside or do something else. I personally believe in this idea because I have solved numerous amounts of game development problems by just taking a shower when I was stuck.
It also helps that I try to keep my brain as clear as possible. This is because the average brain goes through 50,000 thoughts a day and it is hard to keep track of everything you remember. To overcome this problem I normally write any thought I might find useful down on a piece of paper or on a note taking app. This way I can always come back to the thought in the future and can keep my brain clear and ready to work subconsciously whenever I might be stuck.
I hope this little bit of information will help you in the future just as it helps me everyday when I get stuck on a game development problem.