First of all, since this is a friend's boat it might be helpful to mention the type of boat that you are sailing.
But as I read your post, I am skeptical that its a keel sectional problem, or a mast rake problem. You do not describe a lee or weather helm, so mast rake seems like a red herring, and even if you completely screwed up the foil shape, I doubt it is the problem.
What you are describing is a classic case of bad sails, bad
rig tension or bad sail trim. It is surprising how little it takes for a set of sails to be blown out enough to kill speed and pointing enough to be very noticable.
And frankly, it sounds like your boat is point extremely badly, not just slightly so. If the 'squares' on your windex are truly set at 90 degrees this boat should never get near a race course. Because the windex reads apparent wind on each tack, the typical angles between the center of the squares (i.e. wires) on a decent race boat is somewhere around 40-50 degrees.
I suggest that you walk us through the basics.
What kind of boat is this?
Does the
Jib have top, middle and bottom forward telltales?
Has the lead been set so that each break at the same time?
When the
jib is full in, does the leech curl sharply inward or flutter?
When the
jib is full in, what is the angle between the centerline of the boat and a
line between the Clew and the Tack?
Are there leech telltales on the mainsail?
When the mainsail is set properly, is the boom on the centerline, and sighting from below the boom, is the upper batten set parallel to the boom?
Here's the trick question, do any of the battens **** to windward and do all the telltales fly?
When the main is set properly?
Are the sails too full or too rounded? (within reason this is about outhaul tension, halyard tension, backstay tension and sheet tension- throw away the cunningham)
Okay, when everything is set properly, can the helmsman keep the jib telltales flying?
If your answers are that the sails are in good shape and properly set and you still only show and apparent wind of 45 degrees, I would suggest that you delegate this boat to be the boat that you cruise and find a decent boat to race. ;-)