The first circuit is a 2 Amp, 0-12 Volt, voltage regulator type circuit. It uses a 10K ohm potentiometer to control the output voltage and has a light emitting diode that will indicate an overload condition. A DPDT toggle switch controls the train direction. The TIP142 output transistor will need a heat sink to keep it cool and the 0.33 ohm resistor should have a 5 Watt power rating. The OPAMP is one half of an LM 358. One quarter of a LM 324 could also be used.