Throughout the Quant part of the test, your strategy should be the same: if you know how to solve a problem, invest the time to get an answer. If, after perhaps a minute, you can't see how to solve, take your best guess and move on; you'll find a more rewarding place to invest that time later in the test.
If you see how to solve them, hard questions don't take more time than easy ones. It's seeing how to solve that takes the time. Most of the time in math, you either see how to solve quickly or you just won't see a method for ages. So it usually doesn't help to stare at a very hard question for a long time if your solution isn't going anywhere.
Now, if you did end up with, say, 6 questions left and 6 minutes on the clock, the best strategy is to quickly decide, reading each question "I can solve this" or "I'm not sure how to solve this". If you can solve, invest the 2 minutes you might need. If you're not sure if you can, just guess very quickly and evaluate the next question. If you do that, you'll probably get 3 right answers on the questions you solve fully, and often another lucky guess for 4 right answers. If instead you just spend 1 minute per question, you'll probably find you don't do much better than if you'd guessed randomly (most people get 2 right answers doing that), so you can meaningfully increase your hit rate by optimizing your timing strategy near the end, if you do find you run short of time in Quant.
None of the above is easy to apply to the Verbal section, however.