Just as gold now is more valuable than gold later, early beakers are more valuable than later beakers, especially if they get you to key tech points more quickly. For example, we all know that GSs will generate far more beakers the later they are bulbed, but it can still be advantageous to bulb a GS to, e.g., get Scientific Theory or Plastics that much more quickly or to jump to the Modern Era to grab an early Ideology.
Even if the early science building does not enhance the yield of your RA (since your RA partner is generating fewer beakers), the extra raw science for those 30 turns should not be dismissed. In your example, you assume the early science building will take 12 turns to hard-build, but that rush-buying only accelerates your next tech by 3 turns. That may be an OK assumption in general terms, except it misses the point that the early science building will accelerate every subsequent tech as well. Also, the extra science building may, at the margin, yield you one more (or at least an earlier) GS, which the RA will not do.
In any event, this is a contrived experiment. The choice is usually not (1) sign 2 RAs now and hard-build the science building over the next X turns vs. (2) cash-buy a science building now and defer that round of RAs for 30 turns. If that is your choice, you must have pitiful gpt and/or no luxury trades maturing any time soon. The more common choice, in my experience, is either (1) doing the RAs now and deferring rush-buying the science building until I have the gold or (2) rush-buying the science building now and doing one RA a few turns later and another some number of turns after that, perhaps funded with renewed lux and strategic resource trades, or a gpt for gold trade with the RA partner (assuming your RA partner has the gold). I usually do (1), if for no other reason than an ill-timed denunciation or DOW will kill the RA, but the science building will keep chugging along. Also, except right after researching Education, I think it is rare to be able to sign two RAs on the same turn -- usually one or more AIs lack the gold.