Can you please help me with this problem?

Can you please help me with this problem? I’m trying to understand the concept! Problems 8 and 12!