  Hong-Ou-Mandel (HOM) effect is known to be one of the main phenomena in
quantum optics. The effect occurs when two identical single-photon waves enter
a 1:1 beam splitter, one in each input port. When the photons are identical,
they will extinguish each other. One of the main elements of the HOM
interferometer is the beam splitter, which has its own coefficients of
reflection $R = 1/2$ and transmission $ T = 1/2 $. In this work, the general
mechanism of the interaction of two photons in a beam splitter is considered
using an analytical solution, which shows that in the HOM theory of the effect
it is necessary to know (including when planning the experiment) not only $ R =
1/2 $ and $ T = 1/2 $, but also their root-mean-square fluctuations $ \Delta R
^ 2, \Delta T ^ 2 $, which arise due to the dependence of $R = R(\omega_1,
\omega_2) $ and $ T = T (\omega_1, \omega_2) $ on the frequencies where
$\omega_1, \omega_2$ are the frequencies of the first and second photons,
respectively. Under certain conditions, specifically when the dependence of the
fluctuations $ \Delta R^2 $ and $ \Delta T^2 $ can be neglected and $ R=T=1/2 $
is chosen, the developed theory coincides with previously known results.
