You must pick one language for a project. You have 4 backend languages (Python, Java, Go, Rust) or 3 frontend languages (JavaScript, TypeScript, Dart).
How many ways can you choose? You pick backend OR frontend, not both. That's the sum rule: 4 + 3 = 7 ways.
Notice the choices are separate. Picking Python excludes JavaScript. No overlap. That's when you add.