Clean all the end connections of the hard lines, at the distributor and at the brackets for the soft rubber hose connection, with brake cleaner to remove any dirt. You do not want to introduce dirt in to your brake system.
Let the brake cleaner dry. You can then begin reconnecting the soft rubber hoses, and can connect the hard lines to the distributor.
Before driving your car you will need to bleed the system to remove the air that has been introduced. Never drive your car after doing work on the brake lines without first bleeding it properly. See the brake flush/bleeding guide for help with this.