In the Lagrangian formalism, The Lagrangian L = T(kinetic energy) - V(potential energy). The equations of motion for a given system is given by minimizing the action functional which is a integration of L. 
In the Hamiltonian formalism, The Hamiltonian H = T(kinetic energy) + V(potential energy). The equations of motion for a given system is described by Hamilton’s equations which are differential equations of H. 
Say it in an informal way: one formalism is 'subtract (T-V)' then 'integrate', the other formalism is 'add (T+V)' then 'differential'.
There is an interesting relationship between them: 'add' is the inverse of 'subtract', and 'differential' is the inverse of 'integrate'.
My question is : is there any deep understanding behind this relationship?
- No-Nonsense Classical Mechanics, JAKOB SCHWICHTENBERG, 2019. page 114-115.