Lansing is a city situated along the Missouri River in the eastern part of Leavenworth County, located in northeast Kansas, in the Central United States. As of the 2010 census, the city population was 11,265. It is the second most populous city of Leavenworth County and is a part of the Kansas City metropolitan area.
Lansing is the second most populous city in Kansas 
In the context, Lansing is said to be the second most populous county of Leavenworth County. It is possible that it is also the second most populous city in all of Kansas, but there is no way of knowing based on the information in the context. The system was likely fooled because Lansing is described as the second most populous city of Leavenworth County, and the system probably didn't know that saying it is the second most populous of Kansas means something different. 