WASHINGTON — Well-heeled clients pay tens of thousands of dollars to hit the legal jackpot — Supreme Court review of their appeals. But on Tuesday, the court decided to hear cases filed by two people who couldn’t afford or didn’t bother to hire an attorney.

One was written in pencil and submitted by an inmate at a federal prison in Pennsylvania. The other was filed by a man with no telephone living on Guam.

Neither case seems destined to join the ranks of Gideon v. Wainwright, the landmark 1960s case filed by a prisoner with no lawyer that established a criminal defendant’s right to a lawyer. Both show, however, that when the court is looking to resolve finicky legal issues and the right case shows up, it doesn’t matter whether the author of the appeal wears a natty suit or prison garb.

Kim Lee Millbrook, a prisoner at the federal prison in Lewisburg, Pa., sued the government after accusing prison guards at the Special Management Unit of sexually assaulting him in May 2010. Prison officials said Millbrook’s claim was unsubstantiated. The lower courts threw out Millbrook’s lawsuit, but justices said they would use his appeal to decide the narrow issue of when the government can be sued for claims of abuses by federal prison guards.

Steven Alan Levin, the petitioner on Guam in the other case granted by the Supreme Court, Levin sued over a Navy surgeon’s performance of unsuccessful cataract surgery on him. He was operated on in March 2003 at the United States Naval Hospital in Guam. Levin said he withdrew his consent for the surgery before the operation began but doctors proceeded anyway. Levin suffered complications, which require ongoing treatment.

Levin sued the U.S. government for medical malpractice and battery. The courts threw out the medical malpractice complaint and kept the battery charge. But the 9th U.S. Circuit Court of Appeals said the government is also immune from being sued for battery. The high court will now decide whether the government can be sued for improper actions committed by military medical personnel while on the job.

Among other cases, the court will rule on whether lawyers can obtain personal information from driver’s license records to recruit clients for lawsuits, despite a federal privacy law. The justices will hear an appeal from three South Carolinians who objected to solicitations to join a lawsuit against car dealers.