I have no points in surgery or training skill. If I buy the books (the ones you have to keep in your inventory), will the +1 bonus apply to my highest skill companion or does the +1 bonus just applies to the player character?
The +1 from the books won't help you if you have no points in surgery. You have to have at least 2 points in that skill to support your companion who supposedly has a higher skill.
It's like this:
0-1 +0
2-4 +1
5-7 +2
8-9 +3
10 +4
For instance, if your companion has a surgery skill of 5 and you yourself have only 1 in surgery due to the book you won't add any points to your companions surgery skill because you fall into the above category 0-1 which adds +0. If you put 1 point into surgery and have the book you fall into the category of 2-4 which adds +1. It's the same if you have the skill and your companion supports you, i.e. if you have for instance a tactics skill of 6 and you have a companion with tactics 2 he will add +1 to your tactics.
Training works different, for every point in trainer you will add a certain amount of experience to your troops/companions. Also worth of note, training skill stacks, i.e. every companion that has points in this skill will add experience to other every other party members.
Book bonus applies only to you (the player character), but teh final result is your points + highest skill companion bonus (see above)
By the way you can check, iirc book increased skill points are green
To clarify further: the books don't give companion bonuses. Most give you +1 point permanently to whatever skill when you read them. In order for you to give a companion a bonus, you must have at least 2 points in whatever skill, whether you got one from a book or whether you added them manually when leveling up.
There are some books that don't add points permanently, but only as long as you carry them in your inventory. If you get up to at least 2 points using the book, it will count toward a companion bonus, but if you remove it from your inventory, the bonus will go down, or go away entirely if your skill level drops to 1. (So don't accidentally sell them!)