On a Unique Solution of the Stochastic Functional Equation Arising in Gambling Theory and Human Learning Process