Measuring speed with 2 PIR sensors

Do cars trigger your PIR? Did you try that already?

I understand that typical school assignments very often put you to work with some of the worst imaginable tools for the job - but in this case the first thing you should do is try whether you can even register a car. After that you can get a second one, do your (VERY inaccurate) speed measurements, hand it in, and move on.

Lots of code examples out there, just a quick Google query away. Do your own homework.