Solution to generalized matrix equation AV − EV J = BDWDJ + BPWP