If the problem is only, as you guess, that the non-working jack is on line 2, then it is easy enough to rewire if you’re comfortable with electronics. Note that (working) phone lines do have voltages (around 50VDC on-hook, around 100VAC ring), so if you’re not careful you can get shocked.
Standard phone cables have four wires but only use two (conventionally colored red and green); these correspond to the left two screw terminals, for line 2, and the corresponding two for line 1. (They are helpfully labeled “GRN” and “RED”; the ones for line 2 are also colored.) Sometimes the second pair of wires is used for a second line; other times houses have multiple four-wire bundles used to wire different floors or areas within the house. Your house appears to have the second situation, since the picture shows two four-wire terminals.
The incoming cable bundle has three colored pairs: one red/white, one green/white, and one blue/white (allowing up to three lines). I can’t quite make it out for certain in your picture, but it looks like the two blue/white wires are connected to line 1’s GRN and RED terminals, and the red/white wires are connected to line 2’s GRN and RED. This probably indicates that the two RED/GRN pairs are connected to various jacks inside the house. At some point in the past, the red/white and blue/white pairs were probably both active lines, but now only one of them is.
You just need to do two things: Disconnect the wire pair for the disconnected line; then jumper the two GRN terminals together, and likewise the two RED, so that both internal lines are connected to the same, working phone line. First you have to figure out which pair (red/white or blue/white) is active. If you have a voltmeter you can just measure voltage from RED to GRN for line 1 and then for line 2; the live line should have a voltage, the disconnected one probably won’t. Alternately, disconnect one of the two red/white wires (loosen the screw and unwrap the wire, making sure it doesn’t touch the other terminal and that you don’t touch both terminals) and see if your phone still works. If it still does, then the blue/white pair is the active line; so disconnect the other red/white wire and tape over the end of each. Otherwise, red/white is active; so reconnect this wire and disconnect and tape over the blue/white ones instead.
Then use some short pieces of wire to connect RED and RED, and likewise GRN and GRN. Now hopefully all the lines in the house are working. … If not, either the line is disconnected/broken elsewhere, or the other line is connected to a different pair of wires.