Aims. We aim to demonstrate that the presence and mass of an exoplanet can now be effectively derived from the astrometry of another exoplanet. Methods. We combined previous astrometry of beta Pictoris b with a new set of observations from the GRAVITY interferometer. The orbital motion of beta Pictoris b is fit using Markov chain Monte Carlo simulations in Jacobi coordinates. The inner planet, beta Pictoris c, was also reobserved at a separation of 96 mas, confirming the previous orbital estimations. Results. From the astrometry of planet b only, we can (i) detect the presence of beta Pictoris c and (ii) constrain its mass to 10.04(-3.10)(+4.53) M-Jup . If one adds the astrometry of beta Pictoris c, the mass is narrowed down to 9.15(-1.06)(...