Let's use the variable x to represent the cost of one rose and y to represent the cost of one carnation.
If 8 roses and 5 carnations cost $31.75, we can write the following equation:
[tex]8x+5y=31.75[/tex]If 1 rose and 3 carnations cost $5.75, we can write a second equation:
[tex]x+3y=5.75[/tex]From the second equation, we have x = 5.75 - 3y.
Using this value of x in the first equation, we have:
[tex]\begin{gathered} 8(5.75-3y)+5y=31.75\\ \\ 46-24y+5y=31.75\\ \\ -19y=31.75-46\\ \\ -19y=-14.25\\ \\ y=0.75 \end{gathered}[/tex]Now, calculating the cost of one rose, we have:
[tex]x=5.75-3y=5.75-3\cdot0.75=5.75-2.25=3.5[/tex]Therefore the cost of one rose is $3.50 and the cost of one carnation is $0.75.