Cheers for your help, that is really useful. But there is one more thing I am confused about, how do u know what angle the cue ball and the red ball will travel once they hit?
i'm assuming you have not had a trigonometry class. that is the type of mathematics that would be helpful here.
let's look at the simple case. draw a cue ball. now, draw two balls touching the cue ball (in front of it). now draw a line that represents the direction of the cue (it's path). draw this line to the center point of the que. now, with the two balls touching the que ball, draw a line from the center of the que ball to the center of the other balls. that last line should be the direction the second ball is going.
but, how fast will the balls be traveling now? that will be tough to figure out without trig. but, we can still cheat without involving trig :> the clue is in the comparison of the angle made between the line of the cue's path, and the line from the center of the que ball to the center of the ball about to be struck. between them is an angle. in your diagram you may have noticed that the larger the angle (or if you have a straight line - 180 degrees) then you will have the maximum transfer of force from the que ball. if you have a 90' angle, then you have a glancing blow, where the queue will retain most of the energy (speed) and impart a bit on the queue. so, use your creativity to add some kind of ratio involving this angle into your calculation of how much force is given up by the que ball onto the the collision ball.
i think you are approaching the limits of what can be done without knowledge of physics and trig. if this interests you, trig is easy and fun. you can probably get the physics information you need by skimming here and there without delving too deeply in the mathematics.