Both passages are discussing a 14 day event. The underlined portions of the passages above offer clarity to what was going on. There were seven days of the dedication of the altar, and seven days of the feast. That explains more detail for our 14 days, but it gets really confusing when you consider that 2 Chronicles 7 says there was a solemn assembly on the eighth day. Wait a minute, 1 Kings 8 said the people were sent away on the eighth day... which was it: a solemn assembly or the people went away? The key is to keep track of where you're supposed to start counting. Are we counting from the beginning of the 7 day dedication of the altar, from the first part of the 7 day feast, or from the first day of the month?
I want you to be aware that the seventh month of the Jewish calendar which would have been used at the time of this writing is not the same as our calendar at all, but for the sake of a convenient and tangible example, I am going to use a template calendar for the month of July (our seventh month, since the seventh month is specified in 2 Chronicles 7:10) to show how these verse, while confusing, are not conflicting. On the calendar below, rather than writing out "dedication of the altar" I have labeled those days as simply "festival". (You can click on the image to see a larger version.)
Okay, we've marked the eighth day that was mentioned in 1 Kings 8:66, but not the eighth day mentioned in 2 Chronicles 7:9. This eighth day is placed on my example calendar above as being the eighth day into the event, so the day following the seven days of the dedication of the altar. This could have been when they had the solemn assembly.
Alternately, the solemn assembly could also have been placed on July 23 of this calendar, if they counted it as the eighth day of the feast (rather than of the event) and held the solemn assembly prior to dismissing the people, but this would have meant the people were busy doing something or another for 15 calendar days rather than 14.
In case the calendar graphic above isn't helpful to you, I will include the following which has a (not to scale) linear visual: