Congratulations on your new steed, and great work putting it together! Looks like a nice ride. Long post follows, but I've tried to edit it into something a bit more manageable. Here goes...
Before you start
You mentioned you were able to set everything up but the brakes. Forgive my impertinence, but before you go further, can I just check that you greased everything thoroughly before assembly?
- Chainring bolts
- Freewheel, sprocket, and lockring threads
- Pedal threads
- Crank bolt threads
- Stem bolt threads
- Handlebar clamp area
It might seem like a ballache, but you'll thank yourself in a year's time when you want to take something off to clean or change it!
Right, onto brakes...
- Heavy-duty cable cutters. Ones with very stout, sharp jaws. While it looks like plastic, the cable outer is actually made of coiled metal, and if you try and cut it with inferior tools you will blunt them, and make a mess of the cable.
- Selection of allen keys
Let's deal with the front brake first...
Remove the inner cable from the outer, if you haven't done so already, and set it aside. You don't want to cut this until you've dealt with the outer. Nothing makes you feel more stupid than cutting the outer to size with the inner still inside!
Your second picture shows little metal sheaths that pop over the ends of the cable outer. These are important, so don't lose them. They help stop the outer fraying and pulling. Take one of them off for now and inspect the end of the outer. If it is cut nice and neat, great. If not, make a fresh cut (it might take a couple of goes to get a nice clean edge).
Take a small pointy thing (biro tip works fine) and wiggle it around inside the end of the outer, to make sure the opening is nice and wide and smooth. Then re-attach the metal sheath. One end of the outer is now prepared. Now you need to hold it in place against the barrel adjuster on the brake lever, so you can judge the length of cable you will need. Back off the barrel adjuster as far as it goes (so that it protrudes as little as possible). Avoiding any sharp bends, manipulate the outer gently around so it traces a smooth curve from the lever to the barrel adjuster on the brake caliper. Give yourself an extra inch or two, so you have a bit of reserve if you mess up the cut. Repeat what you did with the lever end of the cable, with the caliper end (i.e. cleaning up the hole and re-fitting the metal sheath). Almost there!
Now turn your attention to the inner cable itself (the bit you set aside and didn't cut yet). Now ideally you should lubricate the inner cable with a bit of oil or light assembly grease. Cooking oil will work fine at a push. This just helps protect the cable from rust. Give it a good rub all over. Next, feed it through the hole in the brake lever and out through the barrel adjuster, and slide it into the piece of outer you just cut to size. Feed it all the way through. The nipple on the end of the cable should sit neatly in the recess around the hole in the brake lever. The cable outer should be sitting snug in the barrel adjuster on the opposite side of the lever. Take the end of the inner cable and feed it through the barrel adjuster on the brake caliper itself, from top to bottom. Now seat the cable outer in the "cup" of that barrel adjuster. Pull on the inner cable from the bottom and the whole thing should snug right up nicely. At this point it's worth tightening up the barrel adjuster on the caliper too (so that it sits as low as possible).
All that's left is to adjust the caliper and clamp the cable behind the little plate on it (the slightly ridged bit held on with an allen bolt). To do this, first close the quick-release (the black plastic lever in the bottom right of your third photo) on the caliper, by rotating it downwards. This should help orientate the cable clamp correctly - the allen bolt head should be pointing horizontally outwards. Look from above and you will see a little groove in the metal plate - the cable feeds through here. Slide the cable through the groove and tighten the allen bolt just enough to stop the cable pinging back out and hitting you in the eye.
Next you need to make sure the brake caliper is centred nicely - squeeze the arms together and double-check that the pads are evenly-spaced from the wheel rim. Bear in mind that the pads themselves won't be positioned very nicely straight out of the box, so you may want to shift them about a bit until they align nicely with the braking surface on the rim. It is imperative that the pads do not come into contact with the sidewalls of the tyres. Otherwise you will eat through rubber and blow out your tyre very quickly indeed! More fine tuning can come later, so don't be too precious about it. But if the brake is noticeably off to one side, loosen the mounting bolt a bit and centre it up. Tighten the mounting bolt again afterwards.
Pretty soon you're going to wish you had a third hand... so grab a few strips of gaffa tape to make life a bit easier. You need to pinch the caliper arms together so that the pads almost touch the rim - leave a gap of about 1 to 2mm on each side. This is where gaffa comes in handy - you need to hold the arms in this position while putting tension on the cable, while simultaneously tightening the clamp bolt. Grab the bottom end of the inner cable with some pliers, and pull on it. Hard. Maintain this tension while you tighten the clamp. Don't over-tighten yet - you don't want to squash and damage the cable in case you need to loosen and re-clamp. (Doing this many times in the same place will cause the cable to fray, and strands will snap, and then it's toasted.)
Give the lever a gentle squeeze - not too hard, or the cable will slip - and verify the brakes are doing their thing, and that both caliper and lever return correctly when you release the lever. All OK? Great. Then let's tighten the clamp bolt some more. Tighter than you may first think. Give the lever a good hard squeeze to check it's not going anywhere. Only when you're totally happy, go ahead and cut the excess cable. Leave a few inches of excess on - this gives you something to grip with pliers if you need to tighten the cable later on down the line. Having said that, you have barrel adjusters on your calipers and your levers, so you should be fine. Rather than re-clamping the cable when your brake develops excess play, open up these adjusters as the pads wear and cable stretches. Finally, you should have some little ferrules (technical term: metal doohickies) that slip over the end of the cable. If not, your LBS will give you a few for free. Crimp one onto the end of the cable so it doesn't fray.
Done! On to the rear brake...
That's about it. Lather, rinse, and repeat for the rear brake. Just make sure you leave enough length on the cable so you can turn your handlebars properly without stressing it.
Since this is your first time fitting brakes, take it easy and test them in a quiet car park or something, starting off gently. Once you're happy they're working effectively, give them some real hard tests too. If all is well, you're golden.
I should also add this - get a knowledgeable friend, or your local mechanic, to check them over for you - better safe than sorry.
Finally, to avoid squeaky brakes, toe the pads in a tiny bit so that the leading edge touches the rim first.
Best of luck!