Calculating atomic mass of unknown element in given compound (gas) at STP
Assuming it is given that $\ce{X2O5}$ behaves like an ideal gas, the best approach to do this problem is manipulating $pv = nRT$ to get the equation, which fits the given data. Suppose $m$ is the mass of the gas, $M$ is the molar mass of the gas, and $\rho$ is the density of the gas. Then $n =  \frac{m}{M}$:
$$ pv = nRT = \frac{m}{M}RT \ \Rightarrow \ M =  \frac{m}{v} \ \cdot \frac{RT}{p} = \rho \frac{RT}{p} \tag1$$
Now, you can apply $\rho = \pu{5 g L-1}$ at STP to the equation $(1)$ to find $M$. Then apply $2M_\ce{X} + 16 \times 5 = M$ to find $M_\ce{X}$, which is the atomic mass of $\ce{X}$.