I have a Canon Rebel T3.
Several weeks ago I had an issue with my 50mm/1.8 focusing in AF. It indicated a busy light and would not allow me to take a picture in AF. I was, however, able to take a picture in MF. My kit lens seemed to work fine, so I assumed the problem was with the lens itself. I replaced the lens, but have experienced the same problem with my new 50 mm/ 1.8.
It appears to only be an issue when trying to focus on subjects that are some distance away. Again, my kit lens seems to focus and allows me to take a picture without issue.
Your kit lens may seem to be in focus better because it has a smaller aperture. If two 50mm f1.8's are not working correctly, I suspect you have a canera problem. If you have a friend with another camera, see if the 50's work well on it. If they do this will elimainate them from the issue.
But do a Clear all settings and a Clear all Custom settings, if you have one, in your cmera and try the lenses again. Make sure you have the AF/MF switch turned to AF. Just check all the little stuff first.
If nothing fixes this, a trip to Canon service is likely in your future. If it is, send the camera and the lens to them.
If the camera in is "One Shot" AF mode then this implies a secondary feature called "Focus Priority". Focus priority puts priority on focus lock before the camera will allow the shutter to open and capture the image. No focus... no photo. The exception to the focus priority rule is when you switch the lens to manual focus.
In "AI Servo" mode the camera switches to something called "Release Priority". Release priority puts priority on the camera taking the shot at the moment when you completely press the shutter button... and it will do this regardless of whether the camera had time to focus or not.
This is why the camera reported "busy" when in auto-focus mode but would take the shot in manual-focus mode (it was "busy" waiting for focus to be achieved.)
The fact that the camera can focus with the kit lens and not with the 50mm lens implies the camera AF system is working and the problem is more likely with the lens.
Just in case you were not aware... if you allow the camera to auto-select all 9 of the AF points, then it will always lock focus using the AF point that can obtain the CLOSEST focusing distance to the camera (e.g. if you're shooting a person at some distance but there's an object which is a bit closer (and an AF point is covering that object) then the camera will take the nearer object. To avoid this, switch the AF point selection to a manually selected point and position that point over your intended focus subject (you can half-press the shutter to activate focusing, focus your subject, and without releasing the shutter just re-compose the shot as you want before fully pressing the button.) I mention this just in case the reason your camera wont focus on a distant subject is because there is always something closer it can use instead.
There is also the possibility that you're doing everything right and you have 2 bad 50mm lenses.
I also have a passion for astronomy and on another forum, an indivdual had what seemed to be a defective hand-control for his computer-controlled telescope. He replaced it with a brand controller . It still didn't work (suggesting that perhaps the problem was within the scope). But the symptoms highly suggested the problem was with the hand-control. He replaced it again... it STILL didn't work. He was convinced the problem was within his scope yet nobody could find any problem with the scope itself. He replaced it AGAIN and FINALLY got a working controller (and the scope really was fine).
What are the odds of this happening? Pretty slim... sure. But technically non-zero -- there is actually a chance that your 50mm went bad and your replacement 50mm is also bad.
An ideal way to test this theory is to put the "new" 50mm lens on a different camera body. Any chance you have a friend who also happens to own a Canon EOS camera?
If you bought the "new" lens from a local camera store, you could take your new lens and camera to the store and ask them to have a look at it. They certainly could pop the new lens on a different camera. This is one of the benefits of dealing with a real camera store rather than a big-box store that just happens to sell cameras or an Interent retailer.