In spite of what others say on here, unless the OP saved his card on the site for future use, Trainline will not have retained his card details. Even if they have, they cannot release the data without a Court Order because it would be a breach of the GDPR to do so, because there is no law enforcement process instigated against the OP, because the railway company do not know who he is. It would be tantamount to assisting in a fishing expedition, which is not permitted. Furthermore, that data only proves whose card was used to purchase the ticket. It does not prove who purchased the ticket, and most importantly who was actually using the ticket to travel on the train. It would not therefore be justified to release the data, even it they have it. And even if it did and the data was released, the card holder is under no obligation to say who they bought the ticket for, even if they know. I might buy lots of tickets for lots of friends often. I might travel with one group on one weekend and another on another. I buy all the tickets and they refund me the money. I might not even remember who I travelled with on a particular date and who I bought the tickets for.
People on this site just believe that they know the law and the reality and too easily give up. That is why people without money just plead guilty to road traffic offences, whereas the footballers and celebrities hire the Nick (Mr Loophole) Freeman, and do not give up without a fight, because they can afford his fees and understand his track record.
It is for any prosecution to a prove a case beyond reasonable doubt, i.e. so that the court are sure. And in a case of a £1.50, where the railway company has no idea of who committed the offence, and have no reasonable prospect of finding out who it was and where the cost and difficulty exceeds the money at stake, this matter cannot be taken forward.