It’s a bit hard to debug big formulas like those, but basically you’re accelerating toward the target and limiting the the speed?
I’d break it up into multiple steps and once that works you can combine it again.
Local number a
Local number speed
Every tick
Set a to angle(sprite.x, sprite.y, target.x, target.y)
Set vectorX to vectorX + accel*dt*cos(a)
Set vectorY to vectorY + accel*dt*sin(a)
Set speed to sqrt(vectorX^2+vectorY^2)
Compare: speed>maxspeed
Set vectorX to vectorX/speed*maxspeed
Set vectorY to vectorY/speed*maxspeed