you are correct, subclass can all the protected memebers of superclass, but only through inheritance and not through object reference, If package of subclass is different from superclass.
This should work,
public class B extends p1.A
{
public void process(A a)
{
i = i*2;
}
....