This is not an accurate calculation, first, the main cost of an Arduino is its PCB and the supporting electronics, plus some profit margins to cover the overhead for the manufacturer.
Also, the RAM is not "installed", the actual device where the 2 KiB RAM resides in, is etched on the same silicon chip of the Atmega328p microcontroller. A 328p only costs $2 each, and close to $1.5 in huge quantity [0]. Since it's pretty much a standalone device, needs nothing (not even an external crystal) but power, some wirings and two decoupling capacitors to operate in a minimum system (and yes, even this configuration can run standard Arduino code). Let use a conservative number, $3, it would "only" cost you about 2.4 billion dollars.
Furthermore, Atmega328p is marketed at a "mid-end" 8-bit microcontroller offered by Atmel, mainly for its GPIOs. If you use an ATTiny1614, which is basically the same hardware with much fewer GPIO pins, it would only cost $0.7 for each, let's use $1 as a conservative number, then it would only cost you 0.8 billion dollars for 1.5 TiB of RAM, which should already be considered a very impressive number, since you couldn't even get a NAND gate, or even a MOSFET in the late 1970s for less than one buck. If adjusted for inflation, today's price would be as low as ~$0.17 per 1024 bytes.
And then you consider the fact that it's not only a RAM, but in fact a computer... Isn't it a miracle of Moore's Law?
[0] https://www.mouser.com/ProductDetail/Microchip-Technology-At...