Yes, she can, because if every person gets 15 cookies that's 75 cookies in total which means she will have 25 cookies leftover. Sophia could even give everyone 20 cookies but have no cookies leftover.
You were going in the right direction but the problem was that you needed to subtract and not add. The formula should be y-y1 / x-x1 iirc. Hope this helped.