When something compounds, it means that you stop and calculate the interest up to that point in time, giving you new numbers going into the next period.
For instance, when you compound semi-annually like your problem, it means that after six months, the interest is calculated, added on, then the $400 deposit is made, and then we start a new six-month period. We continue to repeat this for 10 years.
Therefore, we must work in compounding periods, not years. (Unless of course it compounds annually.) So for yours, we have to work in semi-annual periods. So we must know how many total periods (not years) we have, and what the rate per period is.
Since this is twice per year, the rate is only half as much. That is, 7% divided in half. Notice they are asking for the rate "per period." We know it's 7% per year, so what is that for half a year?
Then they're asking for total number of periods. If we compound two times per year, for a total of 10 years, how many times have we compounded? That's the number of periods.
For any problem like this, if we call m the number of compounding periods per year, then your rate per period will be the rate divided by m, and the periods will be the years times m.