r3born said:
Am I right in saying that if Planet B were to approach Star A at the correct angle, it could slingshot around said star - being ejected at an increased velocity than that of it's approach?
For the situation you describe, no, you are not correct.
Assuming that there are no other massive body present, then the speed of B relative to A for a given encounter will be a function of only the distance between A and B. This means, that if the speed of B relative to A is
v at distance
d when B is heading towards A, then the speed will also be
v when B has passed A and is at distance
d traveling away from A. This also means that if A comes from very far away from B (on a so-called parabolic or hyperbolic unbounded orbit relelative to A), then B will again move very far away from B after its encounter.
Another way to put this "relationship" of the two masses is to say that the total mechanical energy of A and B, which is the sum of the potential energy from the gravitational field and the kinetic energy of the masses, must be constant when only gravitational forces are at work, hence there is is no "friction".
However, what gravitational slingshot do provide that can be "used" to increase the mechanical energy is that it changes the direction of travel of a mass, say your planet B, relative to a third mass, say star C (which could be a close companion to your star A), such that B as seen from C has a change in speed and therefore an increase or decrease in total mechanical energy. So, if you have at least three masses that interact gravitationally with each other, then it may occur that one of the masses is "ejected", that is, one of the masses goes from an orbit that was bounded to a trajectory that is unbounded.
A typical example of gravitational slingshot is gravitational assist [1] where the effect is used intentionally by letting a probe slingshot around one or more planets in our solar system in order to give the probe a specific trajectory relative to the Sun that would not be feasible to obtain by using rockets on the probe alone due to the large amount of fuel that otherwise would be needed.
[1]
http://en.wikipedia.org/wiki/Gravity_assist