Let
x--------> The number of red marbles
y--------> The number of blue marbles
we know that
[tex] x+y=27\\ x=27-y [/tex]
equation [tex] 1 [/tex]
[tex] x=3y-5 [/tex]
equation [tex] 2 [/tex]
equate equation [tex] 1 [/tex] and equation [tex] 2 [/tex]
[tex] 27-y=3y-5\\ 3y+y=27+5\\ 4y=32\\ y=8 [/tex]
[tex] x=3*8-5\\ x=19 [/tex]
therefore
the answer is
The number of red marbles is [tex] 19 [/tex]
The number of blue marbles is [tex] 8 [/tex]