Leave the transformer in place (unless you can't reach the backside of transformer), you are only replacing the red and blue wires that go to lugs (solder points) on secondary side of the transformer. It takes a bit of heat to get the solder flowing on these so take your time.
The photo within post #1 shows the primary side of the transformer, opposite side not shown in photo is the secondary side which is where you would be replacing the wires.
Lugs #11 and 12 for lamps (blue wires), 13 and 14 for solenoids (red wires).
The transformer in photo of post number #1 actually looks pretty good. Only thing I would do is pull that brown primary wire away from lug #7 so that the lug doesn't chafe it's way through the insulation. And - in same photo, there appears to be a loose bit of wire under transformer that should be pulled out.