I think you've been working on it without realizing it. Sophisticated problem solving happens unconsciously. We know that from the stories of people who have discovered the answers to problems in their dreams. A chemist had a dream that gave him a clue about what a particular molecule would look like.
Hermann von Helmholtz, a 19th century scientist who was known for solving problems in different fields, said that he never found solutions at his work table. He said he would study a problem very carefully and then put is aside. The solution would come later, often while he was going for a walk on a sunny day.
Some people say that going for a walk is good for writer's block. I have found that lying on the couch and closing my eyes for a little while is good for coming up with an idea.
Another writer's block trick - take an hour or so with pencil and paper to write answers about some topic, maybe as many as 50, then put the questions aside and get back to them later to write answers. This gives you lots of text to work with.
I've also found that lying on the couch is helpful when it seems that I'm too tired to work. I'll lie down and think in a casual way about the work, not trying too hard, just musing. An idea will come to me. I might feel like getting back to work. If not, I'll jot the idea down and work on it later.
This is a motivation trick that's been used in behavior modification programs since the 1930s. It's good for all kinds of things you don't feel like doing. If a task seems like it's too big, think of it as a series of tasks that you can take on one at a time, and start with something really, really easy. When kids say they can't make themselves do their homework, I'll say start by proofreading a paper or by previewing a chapter you're about to read.
If you're up against a deadline, you might be tempted to do nothing but work, and that can backfire. Budget your time so that you still have a healthy lifestyle, or something close to one. I'm not telling you to get drunk but slack off once in a while. Something that can help - a To Do list with due dates, exams, non-school things like doing the laundry and also some things for fun, like concerts.
If you have a problem with high stress, there are simple and effective things. I have details about this in my answers. Also, I'll mention that if you think you might be depressed you can take a screening test online, such as CESD R. Depression facts in my answers.