No, no-one is paying for the solutions to the math problems. In fact, they are only math problems in the same sense that watching a Youtube video is doing a computation.
Miners are checking transactions of other users. The Bitcoin protocol is built in such a way that this process sometimes creates new bitcoins. The creation of new bitcoins is also regulated by the protocol - only 21 million can be created, and the last Bitcoin will be created around 2140. The creation of coins is distinct from the value of the coins, which come from their usefulness, supply and demand.
There is another cryptocurrency, Primecoin (XPM), which uses calculation of prime numbers in the "proof of work" process of the currency. These prime numbers do have potential scientific value, but the value of Primecoin is not linked to the value of the prime numbers. The prime numbers are publicly available, and value again comes from supply, demand and usefulness. The goal is that the computation involved in "proof of work", which must be done anyway, should have a side-benefit.
1There are two mistakes in your answer:
1) There will be only 21M Bitcoin 2) The last Bitcoin will be created whenever block #6,929,999 is found. This would be 2140 if the network actually found one block every ten minutes, but our average time is much quicker, we will be way ahead schedule. – Murch – 2013-10-08T10:45:55.743