How can I simplify this equation : $P=s^{T}_1A^{-1}y-\frac{1}{2}s^{T}_1A^{-1}s_1-s^{T}_0A^{-1}y+\frac{1}{2}s^{T}_0A^{-1}s_0 \tag1$ as below equation: $P=(s_1-s_0)^TA^{-1}\left(y-\frac{s_0+s_1}{2}\right).\tag2$
where T is transpose sign, $s_1,s_0,y$ are vectors and A is positive definite matrix.