Here’s some starting insight into how the light moves for the example (two mirrors with 50% reflection):
source m1 m2 lost
1 →
← 0.5 | 0.5 →
← 0.5 | ← 0.25 | 0.25 →
← 0.125 | 0.125 → | 0.25 →
← 0.125 | ← 0.0625 | 0.0625 →
...
Then take a look at the test 5 and test 6 scenario’s to understand which portion of light to pass through in each direction, depending on from which direction the beam of light comes from.