You can draw a right triangle with one side being the known distance from Farmville to Louisville, 14 mi.
The other side, call it x, is the requested distance from Farmville to Stanton.
The hypotenuse is the 25 mi that separate Farmville and Stanton.
Use Pythagora's theorem:
25^2 = x^2 + 14^2
x^2 = 25^2 - 14 ^2 = 625 - 196 = 429
Take square root from both sides
x = √429 = 20,7 mi.