I am from Chicago originally, and can drive from Madison to the airport in 2 hours. Downtown, because of traffic will take longer depending on time of day.
My daughter played hockey in Milwaukee, and we could be from Madison to downtown Milwaukee in 1 hour 15 minutes. Airport is about the same.
These are times when traffic is moving. Yes, there is usually some kind of construction going to Chicago. This can slow you down to an extra half hour to hour, depending on the time of day, holiday, etc. Hope this helps!!!!
There's also a Van Galder bus line, that stops in Janesville, and Rockford on the way to Ohare airport. Takes about 3 hours, but you can read, and relax, instead of the stress of driving,