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.