For a first order approximation we can start with the time it will take for the asteroid to impact the Earth, say for example the ship lands on it 1 year before it reaches Earth.
The Earth has a radius of about 6000km, so let's say we need to deflect the course of the asteroid by 6000km to miss Earth. Using the simple distance = velocity / time formula the velocity we would need to impart on the asteroid is:
6000000m / (365 * 86400s) = 0.2m/s
Next we approximate the asteroid's weight: An asteroid with a 5km radius would have a volume of 5.24×10^11, a commonly used density for asteroids is 2g/cm^3, which is somewhere between the density of ice and rock. So we'll take the mass to be 10x10^11.
The momentum we need to impart is 10x10^11 * 0.2m/s = 2x10^11kg·m/s
Now for the fuel required: because the ΔV is very small we can ignore the rocket equation and just treat the problem as flinging a large enough lump of mass away fast enough to impart that 0.2m/s. Lets bring some chemical propellant, a generous exhaust velocity would be 4000m/s and we can calculate how much mass we need to fling away at that velocity:
2x10^11kg·m/s / 4000m/s = 50,000,000kg.
This is equivalent to about 17 fully-fueled Saturn V rockets - parked on the asteroid. Getting those 17 Saturn V rockets up there would require thousands of Saturn V rockets.
In a number of ways that is a worst-case scenario, for example if the asteroid is going to barely graze the Earth it would only need to be deflected by a few hundred km. If there is more time, like a decade, the required deflection is proportionately less. But even landing 5000t on an asteroid would be of formidable difficulty. In reality our only hope would be using the asteroid's own mass as propellant, by vaporizing parts of it with nuclear bombs or giant lasers, or using a mass driver to fling away hundreds of thousands of tons of rock.