From the compatibility equation, the magnitude of P required to make the beam deflection equal to zero at B can be computed:

Here is Canvas object wihch demonstrate the problem.