The trains will move away from eachother. They will Repel one another because the sides that are facing eachother on the magnet are the same
The positive side of a magnet always has S. The negative side always has N. S will always face away from you in a compass