Hi siddharth19,
You ask a really good question. To know when to give up on a question, you need to trust your instincts and follow your internal clock. For instance, let’s say you are 2 minutes into a question, but you know that you are on the right path; in that case, you’d want to keep going even if it took you 3 minutes to answer, right? After all, if you have fully mastered GMAT quant, then you should be in a position to answer some questions in 30 seconds, and thus it’s OK to spend more than 2 minutes (or even up to 3 minutes) on certain problems. On the other hand, say you are 60 or 90 seconds into a problem, and you know that you are going down a rabbit hole and likely will not be able to correctly answer the question. In that case, take an educated guess and keep things moving.
All that said, how have you been scoring on your practice exams? What is your GMAT score goal? You may find it helpful to read this article about
timing strategies for a higher quant score.
Good luck!