Here is an approach to your problem that uses ratsubst instead of a rule:
(%i1) dosub(n1,n2,e) := ratsubst(sum( H(l) * P[l](x), l, 0, max(n1,n2)),
P[n1](x) * P[n2](x), e)$
(%i2) P[4](x) * (P[6](x) - 1);
(%o2) P[4](x)*(P[6](x)-1)
(%i3) dosub(4,6,%);
(%o3)
H(6)*P[6](x)+H(5)*P[5](x)+(H(4)-1)*P[4](x)+H(3)*P[3](x)+H(2)*P[2](x)+H(1)*P[1](x)+H(0)*P[0](x)
Barton