  We analyze the entanglement between two matter modes in a hybrid quantum
system consists of a microcavity, a quantum well, and a mechanical oscillator.
Although the exciton mode in the quantum well and the mechanical oscillator are
initially uncoupled, their interaction through the microcavity field results in
an indirect exciton-mode--mechanical-mode coupling. We show that this coupling
is a Fano-Agarwal-type coupling induced by the decay of the exciton and the
mechanical modes caused by the leakage of photons through the microcavity to
the environment. Using experimental parameters and for slowly varying
microcavity field, we show that the generated coupling leads to an
exciton-mode--mechanical-mode entanglement. The maximum entanglement is
achieved at the avoided level crossing frequency, where the hybridization of
the two modes is maximum. The entanglement is also very robust against the
phonon thermal bath temperature.
