One of the reviewers has asked a technical question that is not related to the main scope of the paper that I submitted. On top of this, I am not sure if the answer I am going to give is correct or not (I have tried it but the technicality involved is not my area of research, so I am hesitant whether I am even correct or not). Can anyone suggest what one should do in such cases? Should I write what I have tried or get external help (the latter is a bit difficult at this stage)? Any ideas would be great.
The best approach to interacting with reviewers is usually honesty rather than trying to be adversarial or evasive. In your situation, I think a paragraph like the following is entirely reasonable:
Regarding your question about whether our approach could also be useful to applications in X: We don't really know. We're not experts in X, and we don't feel like we have a sufficient background to tell one way or the other. We have, however, given this a bit of thought, and here are some ideas we have come up that could go in this direction: [... some (educated) speculation ...]
That all said, as this is outside of the area where we feel competent, we have chosen not to address this in the paper.
And then you just don't mention it in the paper at all.
The best course of action for these types of questions along with the "what do you think of" questions, is to avoid giving answers you're not sure of, as this might give the wrong impression to the referees and even question the reliability of your other results. Don't forget that you are addressing experts in your field, if you are absolutely sure that the question is outside of the scope of your paper, then, you have nothing to worry about, and the effort in your answer will not be in answering the question itself but rather explaining why this question is outside the scope of your paper, along with the references, if any, justifying your claim.
However, things are different if you are unsure that the question is outside the scope of your paper. That's why I suggest you give the question more time, especially if you were given a long time to accomplish revisions. In case you find out that the question is not outside the scope of the paper, but rather hard. Then, you can respond to the referees by mentioning that due to the complexity of the question, you have decided to leave it for your future research. Once again, the claim of the complexity of the question must be justified.
Finally, from my personal experience, referees usually don't insist on having an answer to these types of questions as long as your argument for not addressing them is solid and as long as you have addressed their other concerns well.
The reviewer is making comments to the editor, suggesting refusal or acceptance. You have to reply to the editor, to address (or to confute) these comments.
It would not be nice to ignore the comments, but if you think that the question is outside the scope of the paper, spend as less time as possible.
If you honestly think that not knowing the answer is not an issue for what you present, that even if you do not know the answer to that question you master the methodology presented in the paper and the data collection has been sound ... then just write this.
Contrary to my opening statement, reviewers are doing the reviews to help your product to be as relevant and correct as possible, not to help the editor/journal/publications indexes.
The other answers are great, but I'd feel remiss if I didn't point out that the reviewer might believe you are in a great position to advance an idea. Thus, they might ge offering you a license to publish a wild guess in your discussion section.
Of course, such discussion would require caveats, and creates the risk of kicking up trouble in the next round of review. It's not the safest course.