All of the boxes contain $N - 1$ balls. This is just a complicated conditional probability problem. Lets look at a single box with $r$ red balls and $g$ green balls. What would the probability be of getting green on the second? Well it depends on whether or not you draw a red or green first. If you draw a red first, then there are $\left.p(\text{second green } \right| \text{ first red}) = \frac{g}{r + g - 1}$. However, if you draw a green ball first then you have one less green to choose from giving: $\left.p(\text{second green } \right| \text{ first green}) = \frac{g - 1}{g + r - 1}$. So what are the chances of each condition happening? $p(\text{first red}) = \frac{r}{g + r}$ and $p(\text{first green}) = \frac{g}{r + g}$. Therefore we can finally write:
\begin{align}
p(\text{second green}) =& \left.p(\text{second green } \right| \text{ first red})p(\text{first red}) + \left.p(\text{second green } \right| \text{ first green})p(\text{first green})\\
=& \frac{r}{r + g}\frac{g}{r+g-1} + \frac{g}{r + g}\frac{g-1}{r+g-1} = \frac{g(r + g - 1)}{(r + g)(r + g - 1)} = \frac{g}{r + g}
\end{align}
Not surprising that drawing the second green has just as good of a chance of being green as the first pick.
Therefore for each of the $N$ boxes you need to compute $p(\text{second green})$ (which is just the probability of drawing a green on the first try). Now the condition is that we choose box $r$ which has $p(\text{second green}) = p(\text{first green}) = \frac{N - r}{N - 1}$. The probability of choosing box $r$ among $N$ boxes is just $\frac{1}{N}$ which gives:
$$
p(\text{second green}) = \sum_1^N \frac{1}{N}\frac{N - r}{N - 1} = \frac{1}{N(N - 1)}\sum_1^r (N - r)
$$
The first sum is very easy (you're just summing the same number, $N$, $N$ times) $\sum_1^N N = N\cdot N = N^2$. The second part is easy if you remember the sum of the first $n$ consecutive integers is $\sum_1^n i = \frac{n(n + 1)}{2}$. So this gives:
$$
p(\text{green}) = \frac{N^2 - \frac{N(N + 1)}{2}}{N(N - 1)} = \frac{2N^2 - N^2 - N}{2N(N - 1)} = \frac{N^2 - N}{2\left(N^2 - N\right)} = \frac{1}{2}
$$
For part $2$), we actually already computed that above: $\left.p(\text{second green }\right|\text{ first green}) = \frac{g - 1}{g + r - 1}$. But now you need to sum over the condition that it could be any of the $N$ boxes (edit: However, the last box, box $N$, has $0$ green balls (and thus seeing green first means it definitely wasn't this box. So we should only sum over the first $N - 1$ boxes and divide by $N - 1$, not $N$.):
\begin{align}
\left.p(\text{second green }\right|\text{ first green}) =& \sum_1^{N - 1}
\frac{1}{N - 1}\frac{N - r - 1}{N - 2} \\
=& \frac{N(N - 1) - (N - 1) - \frac{N(N - 1)}{2}}{N(N - 2)} \\
=& \frac{2N(N - 1) - 2(N - 1) - N(N - 1)}{2(N - 1)(N - 2)}\\
=& \frac{N(N - 1) - 2(N - 1))}{2(N - 1)(N - 2)} \\
=& \frac{(N - 1)(N - 2)}{2(N - 1)(N - 2)} \\
=& \frac{1}{2}
\end{align}
This is only valid for $N > 2$ (since if $N = 1$ there are no balls in each box and if $N = 2$ there is only one ball in each box). This result just confirms that drawing balls are independent events.
You just made a minor mistake; the probability of pulling the two greens should be $\frac{2}{10}\cdot\frac{1}{9}$, which gives you the correct answer.
Another way to think about this problem is think of the possible order to pick the balls in. There is $1$ correct way; greens in the first two spots, yellows in the three spots after that, and the reds in the last five spots. So, the total number of ways to pick these balls is
$$\binom{10}{2} \times \binom{8}{3} \binom{5}{5} = \frac{10!}{2!3!5!} = 2520$$
since you're picking two spots out of ten for the green balls, then three out of the remaining eight spots for the yellow balls, and the last five spots go to the red balls. Hence, the probability of picking the balls like that is
$$\frac{1}{2520} \approx 0.0004.$$
Best Answer
With replacement: There are two possibilities. Either a green or yellow ball is drawn second. Hence, the probability that a yellow ball is drawn on both the first and third draws is \begin{align*} P(YGY) + P(YYY) & = \frac{11}{17} \cdot \frac{6}{17} \cdot \frac{11}{17} + \frac{11}{17} \cdot \frac{11}{17} \cdot \frac{11}{17}\\ & = \left(\frac{11}{17}\right)^2\left(\frac{6}{17} + \frac{11}{17}\right)\\ & = \left(\frac{11}{17}\right)^2 \end{align*} which is equal to the probability of selecting a yellow ball twice in two draws with replacement.
Notice that when we are drawing with replacement that there are always $17$ balls in the box, of which $11$ are yellow and $6$ are green.
Without replacement: As above, there are two possibilities. Either a green or yellow ball is drawn second. Hence, the probability that a yellow ball is drawn on both the first and third draws is \begin{align*} P(YGY) + P(YYY) & = \frac{11}{17} \cdot \frac{6}{16} \cdot \frac{10}{15} + \frac{11}{17} \cdot \frac{10}{16} \cdot \frac{9}{15}\\ & = \frac{11 \cdot 10}{17 \cdot 16 \cdot 15}(9 + 6)\\ & = \frac{11 \cdot 10}{17 \cdot 16} \end{align*} which is equal to the probability of drawing a yellow ball twice in two draws without replacement.
Notice that when we are drawing without replacement that the number of balls in the box decreases by one on each selection and that the number of balls of a given color that remain in the box depends on which balls have already been selected.
I will leave it to you to determine whether the probability of selecting a yellow ball on both the first and third draws is higher when the balls are drawn with or without replacement.