Mrs. O'Malley and Mr. Malone (1950)
Mrs. O'Malley and Mr. Malone is a 1950 comedy/murder mystery film set on board a train. It stars Marjorie Main and James Whitmore. It is based on the short story "Once Upon a Train (The Loco Motive)" by Stuart Palmer and Craig Rice.
More at Wikipedia.