L-Pad Impedance Matching Equation
Say $$R1 = 475, R2= 56.2, Rload=50, Rsource=500$$

You simply want from the source side: $$ R1 + (R2*Rload)/(R2+Rload) = Rsource $$

So lets try that: $$475 + (50*56.5)/(50+56.5) = 501.5$$

So this shows that it works.

But as you can see there are 2 unknowns, ie $$R1$$ and $$R2$$. So you need atleast two equations. The one I did above was looking in from the source side. You can form a similar equation from the load side and solve simultaneously:

$$R2||(R1+Rsource) = Rload $$