To reiterate some points... first, let $Y_i$ be the random variable which takes value $1$ if box $i$ contains exactly one ball and value $0$ otherwise.
It follows that the random variable $Y$ which counts the total number of boxes with exactly one ball in them is then equal to $Y=Y_1+Y_2+Y_3+Y_4+Y_5$.
Now... this is very important so listen closely... it doesn't matter whether or not these $Y_i$ are dependent or independent in the slightest! Regardless how they interact with one another, we will have $E[Y]=E[Y_1+Y_2+Y_3+Y_4+Y_5]=E[Y_1]+E[Y_2]+E[Y_3]+E[Y_4]+E[Y_5]$. I'll say it a third or fourth time... this works regardless how these random variables interact with one another. It works if they are independent. It works if they are dependent. It works if some are independent and others are dependent. It works!
You may have confused yourself with other related properties, such as $E[X\times Y]=E[X]\times E[Y]$ which might only be guaranteed $X$ and $Y$ are independent and might fail otherwise. This is not the same property as what we are using above. I'll say it a fifth time... the property above about the expected value of a sum being the sum of expected values works always.
Now... we turn our attention to finding $Pr(Y_i=1)$. For this, we make an assumption as to the random processes involved in distributing the balls into the boxes. The most sensible assumption is that we one at a time take a ball and then uniformly at random select a box to put the ball in. We then take the next ball and independently and again uniformly select which box to put the ball into.
Yes... the balls may themselves be identical to the casual observer. We may choose to imagine however what happens if they balls happened to be uniquely labeled and distinguishable. Doing so should not in any way affect the probabilities involved, though they may affect the size of the sample space or in what format the outcomes appear. What may have before been treated as "there was one ball in the first box and nine balls in the second box" may now be distinguished between the possibilities "the first ball is in the first box and the remaining nine balls are in the second box" versus "the second ball is in the first box and the remaining nine balls are in the second box" etc...
Recall, that to use counting techniques to approach probability questions, we require that the sample space consist of outcomes each of which are equally likely to occur. Using the balls as distinguishable and the boxes as distinguishable, these outcomes are now able to be seen as equally likely (rigorously shown via the assumptions made before about how we decided how to distribute the balls).
So... in calculating $Pr(Y_i=1)$, we see that there are $5^{10}$ different possibilities in the sample space, the $5^{10}$ different ways in which we can distribute balls into boxes, calculated by routine application of the rule of product. Among those, there are $10$ ways to choose which one ball goes into our box $i$. For the remaining nine balls, there are $4$ options for which box to place each into, which by rule of product arrives at a total number of $4^9$ ways to distribute the remaining balls.
Note... we don't bother keeping track of whether or not any other boxes received one ball at the moment! All we are interested in is whether or not box $i$ got one ball. If any others do or don't, it does not matter to us! Here, we are solely interested in finding the probability that the $i$'th box received one ball. All other information is ignored.
This result is extended/explained further by the binomial distribution.
So... taking the ratio, we find that for each $i$ we have $$Pr(Y_i=1)=\dfrac{10\times 4^9}{5^{10}}$$
Now, finishing the problem, we were interested in $E[Y]$ which we remember is $E[Y_1+Y_2+Y_3+Y_4+Y_5]$ which by linearity of expectation, which again remember works regardless of how the random variables are correlated, simplifies as $E[Y_1]+E[Y_2]+E[Y_3]+E[Y_4]+E[Y_5]$. Now, as these random variables $Y_i$ are all Bernoulli (in other words, only takes values $0$ or $1$) this simplifies further as $Pr(Y_1=1)+Pr(Y_2=1)+Pr(Y_3=1)+Pr(Y_4=1)+Pr(Y_5=1)$ which by symmetry simplifies as $5\times Pr(Y_i=1)$ giving the final result of:
$$E[Y]=5\times \dfrac{10\times 4^9}{5^{10}}$$