(a)
[ x ^ , p ^ x 2 f ( x ^ ) ] = [ x ^ , p ^ x ] p ^ x f ( x ^ ) + p ^ x [ x ^ , p ^ x f ( x ^ ) ] = i ℏ p ^ x f ( x ^ ) + p ^ x 2 [ x ^ , f ( x ^ ) ] + p ^ x [ x ^ , p ^ x ] f ( x ^ ) = i ℏ p ^ x f ( x ^ ) + i ℏ p ^ x f ( x ^ ) = 2 i ℏ p ^ x f ( x ^ ) {\displaystyle {\begin{aligned}&[{\hat {x}},{\hat {p}}_{x}^{2}f({\hat {x}})]\\&=[{\hat {x}},{\hat {p}}_{x}]{\hat {p}}_{x}f({\hat {x}})+{\hat {p}}_{x}[{\hat {x}},{\hat {p}}_{x}f({\hat {x}})]\\&=i\hbar {\hat {p}}_{x}f({\hat {x}})+{\hat {p}}_{x}^{2}[{\hat {x}},f({\hat {x}})]+{\hat {p}}_{x}[{\hat {x}},{\hat {p}}_{x}]f({\hat {x}})\\&=i\hbar {\hat {p}}_{x}f({\hat {x}})+i\hbar {\hat {p}}_{x}f({\hat {x}})\\&=2i\hbar {\hat {p}}_{x}f({\hat {x}})\end{aligned}}}
(b)
[ x ^ , p ^ x f ( x ^ ) p ^ x ] = [ x ^ , p ^ x ] f ( x ^ ) p ^ x + p ^ x [ x ^ , f ( x ^ ) p ^ x ] = i ℏ f ( x ^ ) p ^ x + p ^ x [ x ^ , p ^ x ] f ( x ^ ) + p ^ x [ x ^ , f ( x ^ ) ] p ^ x = i ℏ [ f ( x ^ ) p ^ x + p ^ x f ( x ^ ) ] {\displaystyle {\begin{aligned}&[{\hat {x}},{\hat {p}}_{x}f({\hat {x}}){\hat {p}}_{x}]\\&=[{\hat {x}},{\hat {p}}_{x}]f({\hat {x}}){\hat {p}}_{x}+{\hat {p}}_{x}[{\hat {x}},f({\hat {x}}){\hat {p}}_{x}]\\&=i\hbar f({\hat {x}}){\hat {p}}_{x}+{\hat {p}}_{x}[{\hat {x}},{\hat {p}}_{x}]f({\hat {x}})+{\hat {p}}_{x}[{\hat {x}},f({\hat {x}})]{\hat {p}}_{x}\\&=i\hbar [f({\hat {x}}){\hat {p}}_{x}+{\hat {p}}_{x}f({\hat {x}})]\end{aligned}}}
(c)
[ p ^ x , p ^ x 2 f ( x ^ ) ] = [ p ^ x , p ^ x 2 ] f ( x ^ ) + p ^ x 2 [ p ^ x , f ( x ^ ) ] = p ^ x 2 [ p ^ x , f ( x ^ ) ] {\displaystyle {\begin{aligned}&[{\hat {p}}_{x},{\hat {p}}_{x}^{2}f({\hat {x}})]\\&=[{\hat {p}}_{x},{\hat {p}}_{x}^{2}]f({\hat {x}})+{\hat {p}}_{x}^{2}[{\hat {p}}_{x},f({\hat {x}})]\\&={\hat {p}}_{x}^{2}[{\hat {p}}_{x},f({\hat {x}})]\end{aligned}}}
Now, consider
[ p ^ x , f ( x ^ ) ] ψ ( x ) = − i ℏ d d x ( f ( x ) ψ ( x ) ) + i ℏ f ( x ) d ψ ( x ) d x = − i ℏ d f d x ψ ( x ) − i ℏ f ( x ) d ψ ( x ) d x + i ℏ f ( x ) d ψ ( x ) d x = − i ℏ d f d x ψ ( x ) {\displaystyle {\begin{aligned}&[{\hat {p}}_{x},f({\hat {x}})]\psi (x)\\&=-i\hbar {\frac {d}{dx}}(f(x)\psi (x))+i\hbar f(x){\frac {d\psi (x)}{dx}}\\&=-i\hbar {\frac {df}{dx}}\psi (x)-i\hbar f(x){\frac {d\psi (x)}{dx}}+i\hbar f(x){\frac {d\psi (x)}{dx}}\\&=-i\hbar {\frac {df}{dx}}\psi (x)\end{aligned}}}
So
[ p ^ x , f ( x ^ ) ] = − i ℏ d f ( x ^ ) d x {\displaystyle [{\hat {p}}_{x},f({\hat {x}})]=-i\hbar {\frac {df({\hat {x}})}{dx}}}
and so
[ p ^ x , p ^ x 2 f ( x ^ ) ] = − i ℏ p ^ x 2 d f ( x ^ ) d x {\displaystyle [{\hat {p}}_{x},{\hat {p}}_{x}^{2}f({\hat {x}})]=-i\hbar {\hat {p}}_{x}^{2}{\frac {df({\hat {x}})}{dx}}}
(d)
[ p ^ x , p ^ x f ( x ^ ) p ^ x ] = p ^ x f ( x ^ ) [ p ^ x , p ^ x ] + [ p ^ x , p ^ x f ( x ^ ) ] p ^ x = p ^ x [ p ^ x , f ( x ^ ) ] p ^ x + [ p ^ x , p ^ x ] f ( x ^ ) p ^ x = − i ℏ p ^ x d f ( x ^ ) d x p ^ x {\displaystyle {\begin{aligned}&[{\hat {p}}_{x},{\hat {p}}_{x}f({\hat {x}}){\hat {p}}_{x}]\\&={\hat {p}}_{x}f({\hat {x}})[{\hat {p}}_{x},{\hat {p}}_{x}]+[{\hat {p}}_{x},{\hat {p}}_{x}f({\hat {x}})]{\hat {p}}_{x}\\&={\hat {p}}_{x}[{\hat {p}}_{x},f({\hat {x}})]{\hat {p}}_{x}+[{\hat {p}}_{x},{\hat {p}}_{x}]f({\hat {x}}){\hat {p}}_{x}\\&=-i\hbar {\hat {p}}_{x}{\frac {df({\hat {x}})}{dx}}{\hat {p}}_{x}\end{aligned}}}
Back to Commutation Relations and Simultaneous Eigenvalues