Brayan bought x number of shares for p dollars per share and paid a 2% commission.He sold all his stocks for the total amount or r dollars a

Since he paid p dollars for each of the x shares, and also paid a 2% commission, he spent:
[tex]x\cdot p+0.02\cdot x\cdot p=(1+0.02)xp=1.02xp[/tex]And since he sold that all for r dollars and paid a flat fee of $10, he earned in this sale:
[tex]r-10[/tex]Now, his net proceeds are given by subtracting the spendings from the earnings:
[tex]r-10-1.02xp[/tex]