The line from the gas tank is the rubber line. To stop the fuel flow use a pair of vise-grip pliers that don't have any teeth. If your pliers have teeth, you can cut a piece of rubber hose and slide over the teeth, or wrap a cloth around each side. Just like cutting off the outflow of a water hose, you are just pinching the line.
The metal line is the outflow line to the fuel rail. Those nuts can be a real PITA (pain in the a$$ - read your other note

) So you may want to spray some WD-40 or other lubricant to help loosen the nuts. Just be careful with the nuts on the metal line. If you strip the nut you will have to pull the line off and have a replacement nut put on in a machine shop or order another fuel rail. It is best to use the metric wrenches and not an adjustable wrench. Good Luck!