Ring for 5 seconds in the second hour, and stop for 3 seconds until the bell of the third hour starts * * * Time: 2*(5+3)=8 seconds.
Ring for 5 seconds at the 6th hour, and stop for 3 seconds until the bell rings at the 7th hour (if any) * * * Time: 6*(5+3)=48 seconds.
Three seconds after the bell of the sixth hour, if the bell of the seventh hour doesn't ring again, it can be confirmed that it is six hours, not seven hours, so Xiao Ming judges that it should take 6*(5+3)=48 seconds for six hours.