This question an be solved using algebra. We don’t know the exact number of people that were on the train leaving Leeds but we do know at the stop in Derby 67 people got off and 145 people got on and on arrival at Birmingham there was a total of 328 people on the train.
The algebraic equation would be
X - 67 + 145 = 328
To find out what X is e would need to do the inverse of each operation.
So 328-145=183
183+67=250
We now know that 250 people were on the train when it left from Leeds.
250 - 67 + 145 = 328