The appropriate function is the one that considers the initial amount of $35 , the amount spent for 5 caramel macchiatos, and the balance left which is $7 after the purchase
This means the $35 minus the amount spent equals $7
let us assume that the price per item is x for 5 items, then he spent 5x