Resonantly enhanced photoionization in correlated three-atomic systems