Well, from what I know of physics, shadows do not get longer when an object is going faster...
Anyway, are you saying the player uses physics and platform behaviors? That's a sure way to depression... Choose one or the other.
Anyway, if you want to ignore the laws of optics ;)
To get the speed, use distance(0,0,vectorX,vectorY) - it will be slightly different for physics or platform. Then multiply this and some factor by the shadow.width or height, and add a value. This added value will be the size that it goes to at speed zero.
So your formula will be: set shadow.width to:
distance(0,0,vectorX,vectorY) * factor + base_size