Hmm, so lengthening the line is the only solution? I don't really want it longer or need it longer for any other reason... why does short tubing cause foam?
OK, science lesson:
Short tubing causes foam because the beer sees too big of a pressure drop at the end of the line.
Your keg is at, say, 12 PSI. The outlet of the faucet, by definition, is at 0 PSI, (really, these are called "PSIG" ,or PSIGauge. Gauge means, "set relative to atmospheric pressure". In fact, although your gauge reads 12 PSI, your keg is really at about 26.7 PSIA (PSIActual), and the outlet of the faucet is at 14.7 PSIA, or 1 atmosphere of pressure...but whatever).
If you all of a sudden jump from 12 PSI to 0 PSI, a bunch of foam will form, because the CO2 basically gets "shocked' out of solution.
Now, travelling through a tube "uses up" pressure. There is resistance to the flow of the liquid, friction with the tube walls, etc. The energy to overcome that resistance has to come from somewhere, and it comes from the pressure. The pressure of the liquid drops as it travels through the tube!
You want to "balance" the pressure drop with the pressure in the keg. Basically, you want enough tubing to "use up" that extra 12 PSI of pressure in the keg, so the beer exits the faucet at near 0 PSI. Because this drop from 12 to 0 PSI happens slowly, as the beer is travelling, the beer doesn't foam.
With only 5 feet of tube, you are probably only dropping the pressure down to 5 or 6 PSI. You need MORE tube to drop the pressure down more before it exits the faucet. Note that, because pressure is dropping, flow rate drops, so longer line makes your beer flow slower.
There are two answers to the problem: longer lines, or something else to drop the pressure. Some people use epoxy mixer sticks in the diptube of the keg, (search "cure short hose" on HBT to find the thread). The mixer sticks cause a lot of flow restriction, which "uses up" more pressure, and allows you to use shorter hoses. I personally prefer longer hoses, because the mixer sticks are finicky, and you have to make sure they are clean and sanitized each time you rack to a keg, which adds more vectors for infection. Both solutions, however are valid.
If you go with longer hoses, do NOT splice in more line. You need to ditch the 5 foot line altogether, and buy a 10 foot line. If you splice 5 more feet onto the 5 feet you have, the restriction caused by the barbed coupler you'll use will cause a drastic pressure drop, (called a venturi effect), and will create foam in the line, so you'll be no closer to the perfect pour then you were before.