I don't think there's any reason to think there's a plot hole. Both parties had off-screen downtime. We don't know how long they were hanging out at Cloud City before the Imperials arrived to pickupspring their trap on Han and the gang. We also don't know how much time Luke spent training. In my mind, it seemed like he spent a short time training, and was interrupted by his friends being in danger.