No the best thing isn't both at once. Only replace the one that needs it. Why replace something that isn't a problem. If you were talking the balljoints on one side yeah I would do both but not the hub bearings. You should on the other hand keep an eye on the one that isn't replaced.