There is an extended discussion of such problems and a graphical method of solution in Chapter $4$, ‘Bouncing Balls in Polygons and Polyhedrons’, of _Martin Gardner’s $6$th Book of Mathematical Diversions from ‘Scientific American’_. He says that the graphical method, which uses rhomboidal graphs on a grid of equilateral triangles, first appears in M.C.K. Tweedie, ‘A Graphical Method of Solving Tartaglian Measuring Puzzles’, _The Mathematical Gazette_ , Vol. $23$, No. $255$; July, $1939$, pp. $278$-$282$.
More accessible is the extensive discussion of the problem starting here at Alex Bogomolny’s Cut The Knot! site.