From the walkthrough:
To throw a rock, click a rock, then click rock on man and then click on the place you want to throw the rock.
Click on the indent above the bear. The bear wakens and looks back.
Immediately take another stone, click rock on man and throw it at same indent.
Eventually, after 2 stone throws on this spot a den will open and the bear goes in.
Immediately, throw a stone on the stalactite to get it out of the way.
Follow it with another stone throw on the rocks above the bear to cause a rockslide and block the bear inside the den.
If correctly done, what happened on the fresco happened with the real bear on the ledge.