Method 1
160-(5x20)=160-100=60
$60-$50=$10
one photograph purchased with $10 balance.
Method 2
Let the number of photographs purchased be y .
(5x20)+(yx50)=160
100+50y=160
50y=160-100
50y=60
y =60/50=1.2
y=1 (rounding off )
one photograph was bought.