a) Prove that for all real numbers $k,l,m$ holds :
$$(k+l+m)^2 \ge 3 (kl+lm+mk)$$
When does equality holds?

b) If $x,y,z$ are positive real numbers and $a,b$ real numbers such that $$a(x+y+z)=b(xy+yz+zx)=xyz,$$
prove that $a \ge 3b^2$. When does equality holds?

### Part (a)
1. We start with the given inequality:
   \[
   (k + l + m)^2 \geq 3(kl + lm + mk)
   \]

2. Expand the left-hand side:
   \[
   (k + l + m)^2 = k^2 + l^2 + m^2 + 2kl + 2lm + 2mk
   \]

3. Rewrite the inequality:
   \[
   k^2 + l^2 + m^2 + 2kl + 2lm + 2mk \geq 3(kl + lm + mk)
   \]

4. Simplify the inequality by subtracting \(3(kl + lm + mk)\) from both sides:
   \[
   k^2 + l^2 + m^2 + 2kl + 2lm + 2mk - 3(kl + lm + mk) \geq 0
   \]

5. Combine like terms:
   \[
   k^2 + l^2 + m^2 - kl - lm - mk \geq 0
   \]

6. Notice that the left-hand side can be rewritten using the identity for the sum of squares:
   \[
   \frac{1}{2} \left( (k - l)^2 + (l - m)^2 + (m - k)^2 \right) \geq 0
   \]

7. Since the sum of squares is always non-negative, the inequality holds:
   \[
   (k - l)^2 + (l - m)^2 + (m - k)^2 \geq 0
   \]

8. Equality holds if and only if each square term is zero, i.e., \(k = l = m\).

### Part (b)
1. Given the conditions:
   \[
   a(x + y + z) = b(xy + yz + zx) = xyz
   \]

2. We need to prove:
   \[
   a \geq 3b^2
   \]

3. From the given conditions, express \(a\) and \(b\) in terms of \(x, y, z\):
   \[
   a = \frac{xyz}{x + y + z}, \quad b = \frac{xyz}{xy + yz + zx}
   \]

4. Use the inequality:
   \[
   (xy + yz + zx)^2 \geq 3xyz(x + y + z)
   \]

5. Substitute the expressions for \(a\) and \(b\):
   \[
   \left( \frac{xyz}{b} \right)^2 \geq 3xyz \left( \frac{xyz}{a} \right)
   \]

6. Simplify the inequality:
   \[
   \frac{(xyz)^2}{b^2} \geq 3xyz \cdot \frac{xyz}{a}
   \]

7. Cancel out common terms:
   \[
   \frac{xyz}{b^2} \geq 3 \cdot \frac{xyz}{a}
   \]

8. Rearrange to isolate \(a\):
   \[
   a \geq 3b^2
   \]

9. Equality holds if and only if the initial inequality holds with equality, i.e., when \(xy + yz + zx = 3\sqrt[3]{(xyz)^2}\), which implies \(x = y = z\).

The final answer is \( \boxed{ a \geq 3b^2 } \)