You can list the hours under two different time frame within one entry in the Work & Activities section:
6/2022-8/2022: 400 hours
6/2023-8/2023: 350 hours
It is perfectly clear in that way that you worked two summers. Your year of HS graduation appears on your application as does the year you started college. It is easy to see the picture.
While some will tell you that you can't list things from college, there is no such rule. While you generally want to have more recent things, you can certainly list the employment before the start of college.