The revised phrasings are better, but if someone's spent "a week or a month or maybe years" on a problem, consider asking what they think are the tricky tradeoffs and so on and give them a minute or a few sentences or an email or whatever to tell you before you launch into anything about your idea.
Not for politeness, but because if they're knee-deep in the problem they probably learned something you don't already know about it. It may illuminate why your idea wouldn't've made sense before you ask. You may get another, better informed idea. You may still have the same idea but learn something on the way there. It's a gamble worth taking if possible.
And, sure, if there's no time for that kind of convo, there are ways to politely offer your intuition that X might have worked, and that can be a shortcut to finding at least one thing that wasn't in your mental model of the problem. But, if you think they understand the problem much more deeply than you do, offering them a more-or-less open-ended chance to give you a download of what they've learned is a smart move.