How to get the days worked?

Presumably the assistants are as effective as the workers, so $7x$ worker-days did $350$ and $12(10-x)$ worker-days did $400$. Your equation should then be $$\frac {350}{7x}=\frac {400}{12(10-x)}$$


It may be easier to work with the two setup equations below,

$$7(10-n)r=350$$ $$(7+5)nr=750-350$$

where $r$ is the rate at which each works. The first equation accounts for the work done in the first $10-n$ days by the 7 workers and the second for the rest $n$ days together with the 5 assistants.

Then, one can eliminate $r$ in the joint equations and get

$$\frac{70-7n}{12n}=\frac{350}{400}$$

with the solution

$$n=4$$