First off, don't connect the wire from the tender to the one coming from the rear of the locomotive without doing this FIRST...
Look for the screw on the front side of the tender that faces the locomotive. Unscrew this. Inside the tender you will see a circuit board. This is for what Lionel called "The Electronic Sound of Steam." The foam below the circuit board is most likely rotted and needs to be replaced with another piece of foam, or even a piece of cardboard or wood to keep the underside of the circuit board from shorting on the tender frame. Otherwise you'll blow the board (if it's not ruined already), and replacements are tough to come by. The Electronic Sound of Steam is primitive by today's digital sound standards, but at the time it was cutting edge.
Also a common question here: There is NO roller pick up on the tender. Just a clip in pick up with contacts to the wheels ONLY.
Other than that, looks like you have a lot of surface cleaning to do. If you take things apart, you can clean the plastic car body shells with Dawn dish detergent, warm water and a tooth brush. Don't scrub the lettering too hard.
If you go to You Tube, you can find videos on servicing the older Lionel pullmor motors, which is what you have in your engine. You will certainly want to get some plastic safe lubricant for the gears of the locomotive. The actual wheels of the engine are metal with metal gear teeth on the back. But the other gears are plastic.
The locomotive does come apart via 3 screws: Two on the front underside of the engine holding the front wheel assembly and one screw on the top of the loco towards the cab. Getting them back together is a little bit of a trick. Not impossible by any means, but if you're going to attempt it, pay close attention to how you take it apart, because that's how it'll go back together.
The main thing here will be cleaning the motor: The brushes and the armature. That's where a video will come in handy. If you do a Google search, I'm certain you can find more maintenance info.
If the transformer works, don't do anything but wipe it down. Also check the power cord that goes into a wall socket - make sure it's not frayed or damaged. Otherwise the cord will have to be replaced. Not a hard job, if you know what you are doing. Some would tell you to ditch the transformer instead of replacing the cord. But the smaller transformers can come in very handy for powering accessories should you decide to build a layout.
Depending on the time you want to put into this (and how badly the track is), you can wipe the track rails with WD40, let it set for a day, then scrub the rails with one of those 3M green scouring pads. Don't use steel wool as tiny pieces can get on to the track, and then into the locomotive gears.
I had one of those engines at one time and was very happy with it. I sold it for no other reason than I had to downsize and I now sort of wish I still had it.