can anyone help me with my coding...
No, because you have far too much of it. Dump that improperly posted crap, and create a sketch that just makes one motor move one way. When that works, make that motor move the other way. When that works, make the other motor move each way.
Then, you can think about adding some of that stuff back in.