  In this article we present a model of formation of a galaxy with a black hole
in the center. It is based on the Lema\^{\i}tre--Tolman solution and is a
refinement of an earlier model. The most important improvement is the choice of
the interior geometry of the black hole allowing for the formation of Gyrs old
black holes. Other refinements are the use of an arbitrary Friedmann model as
the background (unperturbed) initial state and the adaptation of the model to
an arbitrary density profile of the galaxy. Our main interest was the M87
galaxy (NGC 4486), which hosts a supermassive black hole of mass $3.2\cdot
10^{9}M_{\odot}$. It is shown that for this particular galaxy, within the
framework of our model and for the initial state being a perturbation of the
$\Lambda$CDM model, the age of the black hole can be up to 12.7 Gyrs. The
dependence of the model on the chosen parameters at the time of last scattering
was also studied. The maximal age of the black hole as a function of the
$\Omega_m$ and $\Omega_\Lambda$ parameters for the M87 galaxy can be 3.717 or
12.708 Gyr.
