I have just figured out if you want to open up the safes when robbing a train press R2 while holding dynamite to place the dynamite on the door of the safe and it should stick on, then press triangle or Y to ignite the dynamite and the safe will open