Let x be the number of cookies purchased.
(1) Jane bought x cookies that were $3 each

(2) John bought x cookies $1 each and a small cake for $10

Since they spent the same amount of money, we can equalize the expressions:

Solve for x:

They purchased 5 cookies.
The equation that represents the situation is:
3x=x+10