Please help,

John has some cookies. If he gives each of his friends 5 cookies, there is no remainder. If he gives each of them 3 cookies instead, he will have 36 left. How many cookies does John have?

1 answer

let the number of cookies be x
let the number of friends by y

x - 5y = 0
x - 3y = 36
subtract them:
-2y = -36
y = 18

x - 5(18) = 0
x = 90

John has 90 cookies.