Mode 7 add cars and trees

Hi, I am so bad at maths that I finally, after soooo much tests, I give up and better ask to experts. I have tested and tested de Mode7Driver example trying to add trees and other cars to the road but I never get a fully succesfully way to add them. Anyone can share the math functions to add and update the sprites to this demo? I know there are some excellent projects of mode7 out there, I tested and work great, but I really want to understand how to do that with this sample and lua, my curiosity is killing me right now.
Thanks so much.

Use this alternative

Playdate Mode7 library

I know that library and works great, that is what I mean in my post with the excellent projects, but I wanted to know how to do it in the mode7drive sample so that way I can understand mode7 better. I am very bad with math but I love to know how things work and if I had the math way I will, maybe we will, learn so much.
Regards