Simple math problem but solution sometimes give 25?



Second image contains solution but sometimes it gives me 25 as solution