Original: He graduated from Adam Mickiewicz University in Pozna with master's degrees in both law and history.
Simplified: He graduated from Adam Mickiewicz University in Pozna with an masters degrees in both law and history.