Yes, both of these sentences are correct, and have the same meaning. "People are difficult sometimes" is a bit more common.
Generally, in English, we can be quite flexible about where to put our adverbs of time. However, the position can effect the emphasis of the word. Saying
"Sometimes, people are difficult"
really emphasizes 'sometimes'.
Hope this helped!