Effect of the mechanical oscillator on the optical-response properties of an optical trimer system