A DUI in Pennsylvania is a misdemeanor
with a possible jail sentence
of up to 6 months, fines and a one year suspension of your license upon conviction. A first possession of a small amount of marijuana carries a maximum possible penalty of 30 days in jail.
So while I hate to answer a legal question with "get a lawyer," that's precisely what yur friend should do first. These are misdmeanors and not traffic infractions, and a plea will give him a criminal record
that can stand in the way of his employment and housing opportunities for the rest of his life, because once convicted of a criminal
offense, he will not be able to expunge that in Pennsylvania until he gets to be 70 years old.
So if there's any way that the DUI can be successfully challenged, reduced, or deferred, it will be through the efforts of a lawyer.
If he can afford one, he should have one with him at this first court
date. If he is indigent, he can show up on his court date, plead not guilty to keep all of his rights open until he gets advised, and then ask the judge to appoint him a public defender.
If he doesn't know of a criminal lawyer to retain, he can get a reliable referral from teh Pennsylvania State Bar Association's Lawyer Referral Service
. For around $50 they will find him a lawyer and the referral fee includes a free half hour consultation with him or her.