The first one appears to be a machinegun, and as such barrel lengths and overall lenghts do not matter.
The first one if it is a short barreled rifle then it is because it started life as a shoulder fired weapon and had a buttstock on it that somone removed and put a short barrel on it.
If it started life as a SP89 handgun then the vertical pistol grip makes it an AOW by NFA classifications and needs be registered as such. If it started life as a SP89 handgun and someone wanted to put a buttstock on it then they would register it as a short rifle then they could put a buttstock on it or not put a buttstock on it but that would not change the fact that it was registered as a short rifle.
Sometimes when people buy an HK or other machinegun conversion kit, they will dual register a gun as a machinegun and a short rifle, that way when they move the machinegun conversion kit to another host semi auto, they are not stuck with an old semi auto gun in illegal configuration.
The second photo is just another AR15 pistol they became popular with a certain crowd that wants short barreled rifles but without the registration. That gun was made as a handgun not shoulder fired from the factory, and as such can never have a buttstock installed unless it gets registered as a short barreled rifle.
You can hav two guns that appear exactly the same but be different NFA items because of thier previous history and what registration changes happended to them.
You need to do a google search on NFA FAQ and read that. it explains the basics, then the important thing after that is decide what you want and buy it now not later.
If you take a 1974 Harley Davidson frame and build it into a total custom jet powered tricycle nothing like the original, on the registration form it will always be a 1974 Harley Davidson motorcycle.