How was it 5 years in the making? Did HHH cause Shawn's retirement did they have any heat at all until right before the match? The only thing I remember from this fued is being amazed at HBK's return performance and all the crappy ppv matches they had after that.
Well, I guess you can point back to the time when Shawn was commissioner and had just turned on the Corporation and realigned with DX. Later that night, HBK was leaving the arena and HHH locked him out, revealing Shawn had left his keys behind. This lead to Shawn being attacked by the Corporation and "injured", thus being taken off TV.
When HBK returned full time, they briefly reformed DX before HHH turned on him, followed by a week or 2 later, laying an attack on HBK similar to the attack by the Corporation, with Michaels going through a windshield.
So in between 1998 before the attack on the first RAW of 1999 and the actual match in 2002, it was always teased between HBK/HHH, due to HBK's affiliation with Vince and a year later, with the roles switched.
So, I guess it really was 4 years in the making, when you look at everything that happened between November 1998 and August 2002 (actually, a little over 3 and a half years).