Given:
Total score of Ethan, E=18 points.
Total score of Michael, M=24 points.
The score for each basket, N=2.
The total points scored by both boys is,
[tex]\begin{gathered} T=E+M \\ T=18+24 \\ T=42 \end{gathered}[/tex]Now, the number of goals scored by both boys is,
[tex]\begin{gathered} n=\frac{T}{N} \\ =\frac{42}{2} \\ =21 \end{gathered}[/tex]Therefore, the number of goals scored altogether by the boys is 21.