You don't "beat" King Boo directly—he's a ghost data recording from a GameCube player (likely a developer time). In Time Trial mode, ghosts are non-interactive benchmarks. To beat his time:
Watch world-record runs on YouTube (search "MKWii Ghost Valley 2 Time Trial WR") to see optimal lines, mushroom usage, and trick spots.