That's the difference between nominal size and real size again, I'm afraid...
5x7" film is not 5 inches by 7 inches, but a small fraction smaller. The original glass plates were truly 5x7", but in the transition to cut film the adapers used a few mm either way. So now a 5x7" film is a little bit smaller than 5 inches by 7 inches.
By an unfortunate coincidence the standard size for nominal 13x18cm (using "nominal" to mean "the film size named xxxx") ended up being very close to 12.7x17.8mm, or almost exactly 5 inches by 7 inches.
5x7" is about 12.5x17.7cm.
13x18cm is about 12.7x17.8cm.
Believe me, those 2mm are crucial at times.