You need to go back to 1st principles of geometry for red rectangs, I would work out right hand point on purple line, then a little tricky but work out point on white line. You have a couple of knowns like the distance of short red perp line. so using geometry can work out the 4 points. Then use a wipeout much easier than trimming around the rectang. Think Pythagoras or sine theory.