Plssss help help help meeeeee plssss help help helppppppppppp meeeeee

Answer:
I think the answer for the first box is 18 and for the second box is 22. I'm not completely sure though.