Your older son will be able to move down to the 5-7 year old group but your younger son will not be able to move up to the 8-9 year old group unless he is within one month of his 8th birthday. If your younger son is mature and you think he will do fine in the 8-9 yo group you might want to nicely ask for the club manager when you sign the boys up and speak to him/her about it. Some have reported success with this, but don't be surprised if they say no.
Another option...one that has worked well for us...is to try to find someone on your sailing that has a similar aged child that your younger son can get to know a bit (via email) before sailing. This forum is a great resource for that. You can post a message with your sailing date and your son's age and say you are looking for buddies for him (and your older son too, if you wish). My kids have made some great friends through online connections and the clubs are all the more fun when you have a pal.
Good luck.