I'll admit that my math isn't that great, I had to take Math III twice to pass it. But my reading comprehension was fairly good. Again, what you quoted:
1 Kings 4:26And Solomon had forty thousand stalls of horses for his chariots, and twelve thousand horsemen.
2 Chronicles 9:25 And Solomon had four thousand stalls for horses and chariots, and twelve thousand horsemen; whom he bestowed in the chariot cities, and with the king at Jerusalem.
According to how you quoted the verses, 1 Kings says that there were 40,000 stalls of horses that were used for the chariots. But how many chariots were there? 2 Chron. says that there were 4,000 stalls that were used for horses and chariots. So taking both verses together, of the 40,000 stalls that Solomon had, 4,000 of them contained chariots in addition to horses.
Again, this is how you've quoted the verses and I don't necessarily agree on this translation. I'm just pointing out that what you quoted here is not a contradiction.