It is just an estimate using this method (though certainly close enough for brewing), but efficiency is not a factor for extract brewing:
OG = m*PE/V
where m is the mass (lb), PE is potential extract (either "point-gal/lb" or %, if % multiply by 46.2), and V is volume.
DME and rice solids both have PE of ~42 point-gal/lb, so:
(3.5 + 1.5)*42/5 = 42
or 1.042 OG in 5 gal. The 3 gal gravity is confusing using the information here, but I'm assuming the directions call for the rice solids to be added late in the boil:
3.5*42/3 = 49