If the shooter was 20 he did not buy the pistols or ammunition for them at a retail outlet; you have to be 21 (federal law) to buy a pistol through retail channels (verified via NICS) and you also have to show ID for 21 to buy pistol ammo.
The rifle was in the car and since he never exited the school he obviously didn't use the rifle in the assault (he may have when he shot his Dad.) He could legally buy the rifle, assuming he was not adjudicated mentally defective or a felon; you only need to be 18 to buy a long gun through retail channels.
So.... where'd he get the pistols?
If he stole them then he already committed a felony before he decided to commit murder. If someone bought them for him then a straw purchase took place which is also illegal. He could have been gifted them legally, but he still couldn't lawfully buy the ammunition (although being in POSSESSION of either is not a crime if you're 18 -- but you better be able to show how you acquired both!)
Therefore, restricting law-abiding citizens from acquiring pistols would have done exactly nothing to deter this offense, since he could not have bought those guns at a retail outlet or through any other mechanism where a NICS check was done.