The puzzle of billiard geometry 
To hit a bank shot:
If the cue ball and the red target ball are the same distance from the rail, then you just aim half-way between them.
Referencing the diagram, the angle to aim at is y=ax/(a+b) if they are not the same distance from the rail (the top). To hit a one bank shot the answer is y=ax/(a+b). I don't need the solution for a 1 bank shot since this is the solution.
Neglecting initial velocity (force of hitting the ball), and pretending the ball would travel forever until it hit another ball on the pool table, how can you calculate what angle you need to shoot at to hit the red ball in a double-bank (two side hits) before hitting the red ball?
How about 3, 4, or 5 hits first?
I have a general idea of what the solution might be, but it's too complex for me.
 A: To solve a 1 bank hit problem, imagine there is a mirror on the top bank. Then the red ball and bottom right corner pocket get reflected across the top bank. Then, you would simply aim at the red ball in the mirror as if there was no bank, and the cue ball will continue "through" the bank into the red ball. For multiple bank hits, can you see how to extend this reasoning?

A: For multi-rail shots, just expand the solution of Alex, above.  Reflect the pool table left and right, above and below the original pool table. Include reflections of reflections.  It might help to color the original four sides in four different colors, to keep track of which side is which in the reflected pool tables.  Be sure to also reflect the target ball.  Now draw a straight line from the cue ball to any reflected target ball.  That line will represent a possible direction for the cue ball to hit the target;  the real and reflected sides that get crossed are the ones the real ball bounces off in its path to the target.
EDIT: Using mathematics to analyze the theoretical solution:
Take the "billiard table" as being the region one ball radius in from the actual bumpers on the real table (Thank you, Johannes).  Let the origin be at the lower left corner of this table, with width $W$ in the $x$ direction and height $H$ in the $y$ direction.  Place the cue ball at $X_c,\,Y_c$, and the target at $X_t,\,Y_t$.
Assume you want to do a bounce off the left cushion and then the top cushion, before hitting the target.  The reflection in the left cushion places the reflected target at $-X_t,\,Y_t$, while the reflection of this reflected target in the top cushion places the reflected reflected target at $-X_t,\,(2H-Y_t)$
The line from the cue ball to the doubly reflected target is at an angle $\theta$ where:$$\theta = \tan ^{-1} \left( \frac{(2H-Y_t)-Y_c}{-X_t-X_c} \right)$$
Note that the angle may need to have $\pi$ radians added, depending on the actual quadrant.
A: For a reflection, the angle coming in is the same as the angle going out. That means that the two triangles in your diagram are similar. Can you figure out the rest?
