You can put this solution on YOUR website! she can make 5 over P part of a page, if P<5 minutes, it's more than a page, we can write the number of page is [5/p] where [x] is the integer part of x, and the fraction of the remaining page is 5/P-[5/P], the fractional part.
If the number of lines on a page is N, then, the number of lines she writes on the latter page is (5/P-[5/P])*N