To shorten brake lines is to replace the line with a shorter one.
The cables, if the ends are brass and soldered on, pull the inner cable to one end and measure how much hangs out, you need this when you shorten the inner cable, you can unsolder the end pull the inner cable out of the housing.
Pull one of the metal ends off the housing, be care full you want to use it again. Now with lower end in place and threaded under the tank right, lay the cable along side the upper attachment point with enough length to turn the bars full left and right with out binding or pulling. Mark the housing at the attachment point.
I use a cut off wheel in a Dremel tool to cut the housing straight and flat. Reinstall the metal end.
Feed the inner cable back in the housing. Now is where the measuring comes in. With it pulled to one end, measure the same distance as you measured at first. Resolder the end on the cable to match the measurement.
Now if you did things right the cable will be the right length and it won't bind or pull when you steer.
Having the throttles suddenly accelerate on a slow turn is not the most fun you can have.
Good luck. It's easier to just buy shorter cables.