Prototype railroads designate which end of a locomotive is considered the 'front'. A letter 'F' is stenciled somewhere on that end. Some railroads use the short hood first for visability, others use the long hood first for crash safety. Diesel locomotives work equally well in either direction.
When possible, many railroads couple two locomotives back to back to make train assembly easier. This can be important if the same locomotives work a line in each direction.
So "correct" is to have the end you designate as the "front" to be leading. The second locomotive can be facing in either direction and still be correct.
This is probably more than anyone wants to hear about the topic, but I recently wondered about the backwards/forwards thing, in general. I thought this pretty concise and informative:
"A "locomotive consist" is a number of locomotives coupled together, all controlled from a single cab by a small crew. In railroad parlance, individual locomotive are called units, and operating several units in tandem with one set of controls is called MU (for "multiple unit") operation. Locomotives come in different configurations. Two-cab units (with a cab at either end) exist, but they're unusual in the U.S. Some units (called "drones") have engines and motors but no cab of their own, and have to be controlled from another unit. Others (called "slugs") have cabs but no engines. But the usual U.S. freight locomotive has a single cab, a diesel engine, an electric generator and traction motors to turn the wheels.
When assembling a locomotive consist, it pays to think carefully about how you arrange the units. Modern diesel-electric locomotives run just as efficiently in either direction, and it's not as if there's anybody actually in those backward-facing locos trying to drive while looking over their shoulders. (Unless Captain Hazelwood has taken up a new profession). You should obviously have the cab of the front locomotive (the "lead unit") facing forward so the crew can see where they're going. What's not so obvious is that it's also a good idea to have the rearmost locomotive with its cab facing backwards. Why? Because that way, after the cars are uncoupled at the end of the line and shunted away, the locomotive consist can now move in the opposite direction, perhaps with a new train attached at the other end. Reversing direction this way is a little more complicated than the crew just hopping in the back and taking off, but turning a few valves and flipping a few switches is usually more convenient than physically turning the whole consist around.
Pairs of locomotives work so well together that they are often used as a unit, semi-permanently united in "married pairs." (As in all marriages, they never see eye to eye.) That way, the pneumatic and electrical connections between them don't need to be messed with each time they start a new run. When you see three locomotives in tandem, chances are good that two of them (the ones that are back-to-back) are a married pair, and the other one is a third wheel, so to speak. Occasionally you'll see a pair of switch engines coupled together in this way, one with a cab and one without. Such a combination is called a "cow and calf," the cow being the unit with the cab, and the calf the drone.)"