Let’s do this with examples:
For, $Q.size=3$
$[1,2,3]$
$[3,1,2] (pop, push) \implies \text{Here 3 is accessed and re-pushed}$
$[2,3,1] (pop, push) \implies \text{Here 2 is accessed and re-pushed}$
$[1,2,3] (pop, push) \implies \text{Here 1 is accessed and re-pushed}$
Here, since $pop, push$ are both considered accesses,
Irrespective of which element is accessed, to revert back to the original $Q$,
$\text{Total Access} = 6$
For, $Q.size=4$
$[1,2,3,4]$
$[4,1,2,3] (pop, push) \implies \text{Here 4 is accessed and re-pushed}$
$[3,4,1,2] (pop, push) \implies \text{Here 3 is accessed and re-pushed}$
$[2,3,4,1] (pop, push) \implies \text{Here 2 is accessed and re-pushed}$
$[1,2,3,4] (pop, push) \implies \text{Here 1 is accessed and re-pushed}$
Irrespective of which element is accessed, to revert back to the original $Q$,
$\text{Total Access} = 8$
For, $Q.size=5$
$[1,2,3,4,5]$
$[5,1,2,3,4] (pop, push) \implies \text{Here 5 is accessed and re-pushed}$
$[4,5,1,2,3] (pop, push) \implies \text{Here 4 is accessed and re-pushed}$
$[3,4,5,1,2] (pop, push) \implies \text{Here 3 is accessed and re-pushed}$
$[2,3,4,5,1] (pop, push) \implies \text{Here 2 is accessed and re-pushed}$
$[1,2,3,4,5] (pop, push) \implies \text{Here 1 is accessed and re-pushed}$
Irrespective of which element is accessed, to revert back to the original $Q$,
$\text{Total Access} = 10$
$\therefore$ Generally,
Assuming that an element can be accessed only via $pop()$ operation -
Irrespective of which element is accessed, to revert back to the original $Q$,
$(2\times Q.size)$ accesses are needed.
So, for $Q.size=50$, irrespective of which element is accessed,
$\text{Total Access} = 2 \times Q.size = 2 \times 50 = 100$