Jimmy Snyder said:
You are not allowed to expand distances. The shape of the room and the placement of shooter and yourself are fixed before the bags are placed. By ricocheting off of oppostite walls, the bullet may approach you from infinitely many different angles.
Expanding the dimensions is just to find an easy way to calculate the direction the shooter has to fire in order to hit you. Once shot, the bullet only travels in four directions over and over and over. All the parallel paths can be treated as a single path.
But six or eight might be the right answer (five definitely is wrong since I made an assumption that might not be true). You have two opposite directions along each side of the parallelogram, plus directly at you, which is the sum of the vectors forming the two sides, plus directly away from you provided the line formed by you and the shooter isn't perpendicular to the wall (the bullet actually has to hit you before it hits the shooter).
I think the difference of the two vectors might hit you, as well, with there being two different differences since subtraction isn't commutative (in other words, you can travel two different directions along the difference, as well). But the problem with the difference idea is that the shooter and you have to be at opposite corners of whatever parallelogram you form. Intuitively, I think the difference is guaranteed to miss you.
Keep in mind the possibilities are restricted by the fact that the angle of approach to a wall has to equal the angle of departure. The bullet can't approach the wall at a 30 degree angle and then bounce off at a 50 degree angle, so really aren't an infinite number of parallelograms that intersect your point. You have to toss out all of the parallelograms that can't possibly occur, and that turns out be almost all of them.
So, for example, if I had a 10x8 rectangle, and the shooter were located at coordinates 1,2 and I were located at coordinates 8,5; then any combination of vectors that added up to 7+3i or -7-3i (or some scalar multiple that gives me the same directions) would hit me. That's an infinite number of vector combinations.
For example, the bullet travels 2+5i, bounces off at 3-9i, and then bounces off the other wall at 2+7i. The bullet hits me.
The lengths of any parellel vectors can just be added together as if they were one vector, since they're traveling the same direction. Additionally, for each vector I add together I also have a vector along the other side that has to be added to the other side of the parallelogram. I don't care that adding them together gives me a fictional vector that travels beyond the rectangle. That still leaves me with an infinite number of vectors that can hit me.
For example, the bullet travels 2+5i, bounces off at 1-18i, then bounces off at 4+10i. It's the same result as if you just added the two parallel vectors together (6+15i), creating a two vector solution of (6+15i) + (1-18i).
However, only vectors where the approach angle and the departure angle will be equal will actually occur. There's an infinite number of vector combinations that don't meet that requirement, and once I've subtracted out the infinite number of vectors that don't meet the requirement, only six remain that meet both requirements.
In other words, if the bullet travels a 2+5i, it isn't going to bounce off at 3-9i or 1-18i. It's going to bounce off at 2-5i (or some multiple, such as 4-10i). And once it finally reaches the side wall, it's going to bounce off at -2+5i or -2-5i (depending on which direction the bullet was traveling when it hit the side wall). So only those vectors that can meet that requirement, plus add up to 7+3i are valid solutions. (2+5i is not a valid solution for the dimensions and locations of the shooter and me).