The rule with clauses modified by when clauses is that eventives are understood to follow what is described in the when clause and statives are understood to overlap (start before and continue during) what is described in the when clause.
When I met John he liked beer. - "like" is stative, so John liked beer before and after I met him.
When I met John he bought me a beer. - "buy" is eventive, so I met John, and then he bought me a beer
Finish is an eventive, so you RETURN precedes she FINISH it.
In your first sentence the perfect construction introduces two twists.
Perfects actually express two time relationships, a primary 'tense' T1 on the HAVE form and a secondary 'tense' on the VP which complements the HAVE form. T1 is located at RT and T2 is always anterior to T1.
Regardless of the aspect expressed in the complementary VP, the perfect construction itself is stative.
Your first sentence thus presents an anterior eventive eventuality she FINISH it embedded in a stative eventuality, she HAVE FINISH it. It is this stative which interacts with the when clause; as a stative it overlaps the when clause.
For as much more detail as I can follow, see the tag-wiki entries on tense and aspect.