.
...to get the cable housing to fit into those lever ends, you need to find a couple of stepped ferrules. I'm not sure you can buy only 2 over the internet, so I'd shop around at some of the local bike shops, asking if they have them. Many still do. If you still have your old cable housings, you can usually remove those ferrules from the ends of those and if the housing is the same size (5mm usually), you can reuse them.
To replace those ferrules on your cables now, you'll need to cut the lower end off, slide it out of the housing, swap the ferrules, then reinsert the cable in the housing. Then you find some kind of stop bolt with a hole in it to slide onto the lower end of the cable, and use that to adjust for the length you need. You might need to shorten the length of the housing as well, to get a good installation fit. So if you don't already have one, buy yourself a
bike cable cutter like the one from Pedro's.
If you've not run brake cables before, you might want to consider hiring this job out to a professional.