We carried out a target survey for Lyman break galaxies (LBGs) and Lyman alpha emitters (LAEs) around QSO SDSS J0211-0009 at z=4.87. The deep and wide broadband and narrowband imaging simultaneously revealed the perspective structure of these two high-z populations. The LBGs without Ly-alpha emission form a filamentary structure including the QSO, while the LAEs are distributed around the QSO but avoid it within a distance of ~4.5Mpc. On the other hand, we serendipitously discovered a protocluster with a significant concentration of LBGs and LAEs where no strongly UV ionizing source such as a QSO or radio galaxy is known to exist. In this cluster field, two populations are spatially cross-correlated with each other. The relative spatial distribution of LAEs to LBGs is in stark contrast between the QSO and the cluster fields. We also found a weak trend showing that the number counts based on Ly-alpha and UV continuum fluxes of LAEs in the QSO field are slightly lower than in the cluster field, whereas the number counts of LBGs are almost consistent with each other. The LAEs avoid the nearby region around the QSO where the local UV background radiation could be ~100 times stronger than the average for the epoch. The clustering segregation between LBGs and LAEs seen in the QSO field could be due to either enhanced early galaxy formation in an overdense environment having caused all the LAEs to evolve into LBGs, or local photoionization due to the strong UV radiation from the QSO effectively causing a deficit in low-mass galaxies like LAEs.