You can but there is a subtle difference. You would use मेहनत से काम करो/ पीटर मेहनत से काम कारता है when you have a specific काम in mind. Along the lines of 'Put effort into the work'.
On the other hand, मेहनत करो/पीटर मेहनत करता है is used when you are talking about working hard in general.