This is called the inverse transform method. Here is a helpful website on solving the problem:
http://www.cs.bgu.ac.il/~mps042/invtransnote.htm