Souter was appointed to the court in 1990 by President George H.W. Bush after just a few months as a federal appeals court judge , but with many years experience as a prosecutor , attorney general , trial judge and state Supreme Court justice in New Hampshire .