gerund or to-infinitive

One day Rita finds a puppy wandering in the street. She decides to adopt it and nameed her Dolly. Unfortunately, Rita’s aunt doesn’t like the dog. She gives it away when Rita is at school. Rita starts to look for the dog when she learns the truth.

to look or looking is better in the last sentence? Also, what does ’ when she learns the truth ’ means? Is it meaning ’ until she knows the truth '?

Rita starts looking / to look for the dog when she learns the truth. – In this case, the two verb forms are synonymous and interchangeable.

When she learns the truth = after she finds out the truth (that her aunt gave the dog away).