Both the methods are correct and will give the same answers. However, in the second method, the last step wherein you have equated h/3H = 1:3 is wrong.
Instead the next steps that you need to do are
I hope now you understand it. And in my opinion, you can use either of the 2 methods for other questions also, because the underlying fundamental logic behind both of them is same.