Yes. That would triple damage.
The formula isn't just right, but the point was how you could use it. (technically, the tp only gives about a 30% boost in my game.)
As for the dam at the end, the way the eval works is that you have to call the variable (dam) at the end for the damage to show properly.
There was a game I played made in RPG MAKER once, I think it was Skyborn or something like that, which used TP as a 'threat meter' - making it so that the character(s) with the highest TP were the ones who were much more likely to be targetted in combat. Certain skills would add a lot of TP, whereas others would "drain" the TP. I thought it was a pretty neat system, and it wouldn't even be that hard to implement using Yanfly's Parameters and AI Core plugins.