Yes, but only if it has a Nikon F-mount so it can be mounted on a Nikon camera.
It's likely a manual focus only lens.
If it is an auto focus (AF) lens that does not have an AF motor in it you will have to manually focus the lens because the D5200 does not have a AF motor in the camera. A D90 has an AF motor in the camera, so if the lens is an AF lens with a Nikon lens mount it should AF on a D90.
An even older Soligor lens may not have the electronics needed to meter nor to AF.