hit on
verb
Meaning
To flirt with; to approach and speak to (someone), seeking romance, love, sex, etc.
"Guys are hitting on them almost all the time."
To discover, pinpoint; to think up; to realize.
"He hit on a great idea for improving the design."