Ans is B.
say we have a 3-ary heap so value of d=3, now say our tree is like-->
So our array will be like
Now say we want to find the location of 3rd child of the 1st node.. So j=3 and i=1
Putting the value the value of i,d,j in eqn A we get 0, so that is Wrong
But putting the values in eqn B we get 4, so eqn B is Correct.