  We study the mechanical and electronic properties of heterobilayers composed
of black phosphorus (BP) on hexagonal boron nitride (hBN) and of blue
phosphorus (\Pblue) on hBN by means of ab-intio density functional theory.
Emphasis is put on how the stress applied on the constituent layers impact
their structural and electronic properties. For this purpose, we adopt a
specific scheme of structural relaxation which allows us to distinguish between
the energy cost of distorting each layer and the gain in stacking them
together. In most cases we find that the BP tends to contract along the softer
armchair direction, as already reported for similar structures. This
contraction can attain up to 5\% of strain, which might deteriorate its very
good transport properties along the armchair direction. To prevent this, we
propose a twisted-bilayer configuration where the largest part of the stress
applies on the zigzag axis, resulting in a lower impact on the transport
properties of BP. We also investigated a \Pblue/hBN bilayer. A peculiar
hybridization between the valence states of the two layers lets us suggest that
electron-hole pairs excited in the bilayer will exhibit a mixed character, with
electrons localized solely in the \Pblue{ }layer, and holes spread onto the two
layers.
