It's on the person explaining the problem to say whether or not they're looking for a solution, or just for someone to vent to. Because some people really do just want options for solutions, and some people really just want to vent.
Don't expect people you come to with problems to be able to read your mind. Don't be upset when they can't. Accusing someone of being hostile for attempting to help with a problem you brought to them is just being an asshole.