First, the meaning is different.
1, do it with someone: do it with someone.
2. Finish someone's work.
Who are you going to do it with?
Second, the usage is different.
1, with sb doing can also be used as the solution of "keep up with …" and "understand …", which is generally used in interrogative sentences or negative sentences. With can also be used as a solution to "merge".
2. Do it with sb: use it to express the adjoint state and make a solution of "the same direction as … [degree, ratio]". Connective noun+infinitive, noun+present participle, noun+past participle. Use means to compare "use" and "parallel use".
3.with sb to do:with can be used to express subjunctive mood, meaning "if, if". When used in chorus and refrain of poetry or folk songs, with often has no practical significance.
Third, the emphasis is different.
1, with sb to do: indicates what the object actively does.
2. use sb done: to show how the object is passive.
3. indicate the future or purpose.