A cat helped a puppy who got stuck in a fence