dmidecode is available you can run:
dmidecode -t 2
This will provide information including the motherboard model and manufacturer. You can then do a search on that information and find the manufacture date of the motherboard which should tell you approximately how old the PC is. It wont be exact since it's not uncommon for a motherboard to be a few years old before being used.
You could also take a look at
/proc/cpuinfo to get information about the CPU model and manufacturer.
Just like the motherboard information though this wont give you anything exact. It is not uncommon for parts to sit around as NOS (new old stock) for years before finally being bought at a reduced price and used in a PC. Say all the parts were manufactured in 2009, that will tell you the PC is less than 10 years old but for all you know it could have been built last year with old parts.
To get information about the installed memory:
dmidecode -t 17
If the PC is made by Dell or HP you can go to the respective manufacturers web portal and search for the service tag/serial number (it's much harder to do this with HP in my experience) and find the exact date of sale.