I am trying to figure this out because today i was going to dive and couldn't pass 20 ft couldn't get my right ear to equalize. That was the first dive so i sat that one out went and got some swimmer ear drops used those then went for the second dive and had no problem at all equalizing.
That was a coincidence. As you go for repetitive dives, both during a single day and over several days, it is usually easier to clear the ears as you go through the sequence. Your failed attempt to do the first dive is what probably made the second dive possible.
When I was a new diver, I had a lot of trouble clearing my ears--a lot. I quickly learned that I would struggle on the first dive, and then do a lot better on the second dive. The next day was better, and by the third day I would have no trouble at all. After that, I learned to start working on clearing my ears before I even went on the vacation. I worked on it on the plane flight. When I arrived at my destination, I would go snorkeling and free dive down as deeply as I could without ear pain repeatedly, getting a little deeper each time. On the boat rides leading to the dive, I equalized repeatedly, and I equalized again before getting in the water. By then my Eustachian tubes had gotten the idea of things, and I was able to dive. Today, because I dive so much more frequently, I don't have any trouble.
One other tip is to avoid going too deep while trying to equalize the first time. If you got to 20 feet on that first dive, you should have been able to equalize enough to finish the dive. If you get through the first 15 feet or so, you are usually good to go. If you go deep enough before equalizing to feel strong pressure or mild pain in the ear, then your Eustachian tubes are really squeezed down, and equalizing will be more difficult. Ascend until you feel only mild pressure--if that--and try again.