We report a detailed study of the pressure (P)-temperature (T) phase diagrams of two Yb-based heavy-fermion compounds, namely, the antiferromagnet YbAgGe and weak ferromagnet YbRhSb. YbAgGe with a quasikagome lattice of Yb ions undergoes two magnetic phase transitions at T M1 = 0.8 K (second order) and T M2 = 0.65 K (first order). With increasing pressure (P) up to 0.5 GPa, the transitions at T M1 and T M2 merge into one transition. For 0.5 < P < 1.6 GPa, T M2 remains constant and abruptly rises above 1.6 GPa. This rise occurs with a significant change in the specific heat anomaly from a small cusp at T M2 into a large peak at T M3 . This finding suggests that the suppressed magnetic entropy is released due to geometrical frustration at ambient pressure. On the other hand, YbRhSb undergoes a transition into an unusual magnetic state at T M1 = 2.7 K, which is associated with a small spontaneous moment of 3 10 -3 B /Yb. Measurements of the resistivity, specific heat, and ac magnetic susceptibility ac reveal that the application of pressure above 0.9 GPa induces another magnetic transition at T M2 below T M1 . T M2 (P) exhibits a V-shaped minimum of 1.8 K at P C = 1.6 GPa. With increasing pressure up to 2 GPa, the significant enhancement of the peak height of ac suggests that the canted antiferromagnetic state below P C changes to a ferromagnetic state with a large magnetic moment above P C . These complex P-T phase diagrams for YbAgGe and YbRhSb are explained in terms of the competition among distinct types of magnetic interactions, magnetic frustration, and crystal field anisotropy.