남동생을하고 같이 공원에서 운동했어요.
I mean to say that my younger brother and I went to a park and exercised together.
Thanks sm!
There is no need of using 을 before 하고 in this sentence.
하고 is a postpositional particle, which is attached to a noun or noun phrase. It indicates a behavior is done with someone as a partner.
을 is also a postpositional particle which indicates the noun is used as the objective case of the sentence.
You can only use one postpositional particle after a noun. So in this case, 남동생하고 같이 공원에서 운동했어요 would sound natural.