See A-Z of rehabilitation exercises
In case you cannot see the video, here is a still sequence -

Active assisted flexions involve both an active muscle exercise and an assisted stretch, and its objective is to improve your range of motion

Hook the foot of the good leg behind the ankle of the bad leg.

Straighten the bad leg and use the good leg to help it up as far as it will go to a count of 5.

Let the bad leg bend back down, supporting it from behind with the good leg.
When it has gone as far back as it comfortably can...

...switch the good leg so that it hooks above the bad leg...

...and use it to press down into deeper flexion as far as can be reasonably tolerated, and hold it there for 5 seconds. Repeat the exercise 5 times.