$M = 20P$

From the top of section A-B

$\sigma = \sigma_a + \sigma_f$
$\sigma = \dfrac{P}{A} + \dfrac{6M}{bd^2}$

$80 = \dfrac{P}{50(40)} + \dfrac{6(20P)}{50(40^2)}$

$80 = \dfrac{P}{2\,000} + \dfrac{3P}{2\,000}$

$80 = \dfrac{P}{500}$

$P = 40\,000 ~ \text{N} = 40 ~ \text{kN}$ *answer*