Photoproduction of beauty and charm quarks in events with at least two jets has been measured with the ZEUS detector at HERA using an integrated luminosity of 133 $pb^{-1}$. The fractions of jets containing b and c quarks were extracted using the invariant mass of charged tracks associated with secondary vertices and the decay-length significance of these vertices. Differential cross sections as a function of jet transverse momentum, $p_{T}^{text{jet}}$, and pseudorapidity, $eta^{text{jet}}$, were measured. The data are compared with previous measurements and are well described by next-to-leading-order QCD predictions.