I'm having a hard time looking for the distance ($x$) on which the forces must be located for a maximum bending moment. The reaction forces in $A$ and $B$ are dependant of the value of $x$, and so changes both the shear stress and the bending moment and I don't know what to do.
P, d and L are known constants.