If you take a look at both the EntityArrow.class and EntityThrowable.class, they should get you started. They both implement IProjectile, so you could mesh them together to create what you want.
In EntityThrowable - there is an onImpact method. You can override this to wait the 3 seconds, create and explosion, then set the arrow to die.
@Override
protected void onImpact(MovingObjectPosition position) {
if (!this.worldObj.isRemote) {
// call the sleep command to wait 3 seconds - not sure what it is in JAVA
worldObj.newExplosion(this, position.blockX, position.blockY, position.blockZ, 5 + rand.nextInt(3), true, true);
this.setDead();
}
}