You could use either of those.
"In front of the station, the two men were talking" - this is quite a neutral statement and just says that they were talking.
"In front of the station, were the two men talking" - this could have a more specific meaning, e.g. if I had been looking for the men for a while but couldn't find them. And look -- in front of the station, were the two men talking! (Or if you want to draw attention to the specific fact that the men were there, in some way... like if outside the station it is normally empty)
In a general example of "inversion in sentences" I would go with your first example.