We can write the amount of cards that Luis keep as:
[tex]50-x[/tex]For Roberto, this is:
[tex]80-3x[/tex](x is the amount of cards Luis gave, so 3x is the amount of cards Roberto gave away)
We know that the amount kept by the two is the same, so we have:
[tex]\begin{gathered} 50-x=80-3x \\ -x+3x=80-50 \\ 2x=30 \\ x=\frac{30}{2} \\ x=15 \end{gathered}[/tex]The number of cards that Luis gave away is 15 cards.