va rog rezolvați cât puteți

Răspuns:
a)9
pe b) nu il stiu cum se face exact si nu vreau sa ti dau gresit