Cat on a Hot Tin Wall

A cat sitting on a wall 4 cubits high saw a rat prowling 8 cubits from the foot of the wall.  The rat too perceived the puss and hastened towards its abode at the foot of the wall; but it was caught by the cat proceeding diagonally an equal distance.  At what point within the 8 cubits was the rat caught?

Brahmasphutasiddhanta, Brahmagupta, 628

Click here to reveal the answer