There seem to be three kinds of slingshot manoeuver. You can bleed some kinetic energy off a moving body, sort of like an ancient slingshot; that allows a spacecraft to either increase or decrease its own kinetic energy. Or you can get more "bang for the buck" with the assistance of a gravity well, be it moving or fixed, by expelling mass after having increased your kinetic energy at the expense of gravitational potential energy.
Your case of a planet (which does not lose mass) plus a sun (which can be assumed as stationary, at least so I guess) seems to me to allow neither.
The third kind is to change direction (in 3-D), and only needs a gravity well, but it seems to me you're not interested in that.
But if it's not under propulsion, your planet must be moving on an elliptical orbit, where the sun is one of its foci (sorry; don't know the actual English word). If your values of 100 Gm and 278 Gm are relative to the apsides of its orbit, then you can use the conservation of energy to work out the exact values. You will need to know the masses involved, though.
Your solution will have a slight error due to relativistic considerations.
In the case of a out-of-system planet, it will be moving in a hyperbolic orbit and I don't think there's a way to get to point B from point A (but I may well be mistaken).