First, the US has no exit checks, no matter when departing by air, sea, or land. One never interacts with immigration authorities when departing the US. Theoretically, CBP could conduct random checks at the gate, but I have never seen that happen in my travels. In general, anyone can leave the US at any time with no problems as long as they can enter the destination country. One's status in the US is irrelevant.
Second, though overstay is illegal, it is not a crime in the US and cannot cause her to be sentenced to a term in prison. The mention of 3 and 10 years sounds like this "lawyer" is confusing it with the 3-year and 10-year ban. Under INA 212(a)(9)(B), if one accrues 180 days of "unlawful presence" and then leaves the US, they trigger a 3-year ban (i.e. will be inadmissible for 3 years after leaving the US); if one accrues 1 year of "unlawful presence" and then leaves the US, they trigger a 10-year ban (i.e. will be inadmissible for 10 years after leaving the US).
But even if this "lawyer" thought she would trigger a ban upon leaving, that would be incorrect in this case, as overstay and "unlawful presence" are different things. Someone must stay past the date on their I-94 in order to start accruing "unlawful presence"; someone admitted with "D/S" on their I-94 does not start accruing "unlawful presence" by staying past any date, even if they stayed for years past the end of their program. The only other ways to have started accruing "unlawful presence" are: 1) if they applied for some benefit to USCIS and were denied along with a determination that they were out of status, or 2) if they were given a final order by an immigration judge in removal proceedings in immigration court. Assuming that neither of these things have happened, your friend has not even accrued a single day of "unlawful presence" so far. See USCIS Adjudicator's Field Manual chapter 40.9.2(b)(1)(E)(ii) (on page 76 of this PDF):
(ii) Nonimmigrants Admitted for Duration of Status (D/S). If USCIS
finds a nonimmigrant status violation while adjudicating a request for
an immigration benefit, unlawful presence will begin to accrue on the
day after the request is denied. If an immigration judge makes a
determination of nonimmigrant status violation in exclusion,
deportation, or removal proceedings, unlawful presence begins to
accrue the day after the immigration judge's order. It must be
emphasized that the accrual of unlawful presence neither begins on the
date that a status violation occurs, nor on the day on which removal
proceedings are initiated. See 8 CFR 239.3
Even if she has no ban, it would likely be very hard for her to get most types of nonimmigrant visas to the US in the future given her overstay.