A quantum Sylvester theorem and skew representations of twisted Yangians