Replacing Mechanical Disk Brake cables
The cable should be pulled through the pinch bolt on the brake, making sure any breaks in the housing are seated in housing stops on the frame, until it is tight enough that the arm on the brake is just beyond it's "relaxed" position.  Then tighten that bolt, check that it works, and if it does, leave about 3" of cable coming out of that bolt, trim the excess and install a cable end.  Otherwise, looks like you did a very good job installing a cable, for I'm assuming the first time?