MATL, 1312 13 14 bytes
r.1H$YlY[ii++1H$YlY[ihs
Input is of the form [3 4]
, that is, a row vector with the two numbers.
Example
>> matl r.1H$YlY[ihs
> [3 4]
7
Explanation
This generates the geometric random variable without loops, by directly applying a a transformation to a uniform random variable. Note that log0.1 a is used instead of log a / log 0.1 to save 1 byte.
r % random number with uniform distribution in (0,1)
.1 % number 0.1
H$ % specify two inputs for next function
Yl % logarithm in specified base (0.1)
Y[ % floor. This produces the geometric random variable with parameter 0.1
i % input number vector of two numbers
ih % inputconcatenate number
+horizontally with the previously generated random value
s % addition
+ % sum of %vector additionelements