can anyone tell me how far it is from our hotel to the canal so we can watch ships?
It's not just the distance, it's the timing.
Most of the time (except Sunday afternoons and Monday through Friday mornings) the drive time is going to take about 2 hours. After 3 PM on Sunday and from 6 AM to 9 AM Monday through Friday, it's going to be more like 2 1/2 to 3 hours.
The other part of the question is when to arrive. Typically, ship traffic through the Miraflores locks stops sometime between 10 AM and 11 AM. You won't see any more ships in the locks until sometime between 3 and 4 PM. All that is due to the Culebra Cut -- which is between Pedro Miguel locks and Lake Gatún. The traffic through the cut is only one-way. They stop the northbound traffic first, and then they allow southbound traffic to resume. Hence, the delay.
The best time to arrive at the visitors' center at Miraflores is either when they open at 9 AM or before they close -- between 3 and 4 PM.