Of course not. The code above calculates the speed from the collected data, but to collected the data you have to put other code inside interrupt service routines, you need some global volatile variables and so on. Thats not like calculating the power of a value which can be written into a single function.
I think you should invest some time in learning about coding for microcontrollers, specialy interrupts, before you continue with your project. Trying to understand to MPGuino code in Arduino language would be a good step