Jack bought 7 tickets to a movie he paid $7 for each adult ticket and and $4 for each child ticket jack spent $ 40 for the tickets how many tickets did jack buy