How does O-Power leveling work?

Solution 1:

The more you use them, the closer you'll get to the next level.

It doesn't matter whether the person uses the O-Power or not, or whether the time has run out. If you can use many in a row, all those uses will count towards moving to the next level.