.
It is clear from the condition, that the number of loonies must be multiple of 8: 8, or 16, or 24 and so on.
So, I will easily solve the problem by "trial and error" method.
    T       A       B       L       E  
Loonies, L   Nickels N =  N =
       N =  -------------------------------------------------------------------
   8	        815                         0                             
  16     	655	                    3                             
  24     	495	                    6                             
  32     	335	                    9
  40     	175	                   12
  48     	15	                   15    <<<---===  ANSWER
  56           -145	                   18
  64           -305	                   21
ANSWER.  48 loonies and 15 nickels.
 
-------------------------------------------------------------------
   8	        815                         0                             
  16     	655	                    3                             
  24     	495	                    6                             
  32     	335	                    9
  40     	175	                   12
  48     	15	                   15    <<<---===  ANSWER
  56           -145	                   18
  64           -305	                   21
ANSWER.  48 loonies and 15 nickels.
Or, using equations
    L +  = 48.75
    8L + 0.05*(3L -24) = 48.75*8
    8.15L = 48.75*8 + 0.05*24
    L =
 = 48.75
    8L + 0.05*(3L -24) = 48.75*8
    8.15L = 48.75*8 + 0.05*24
    L =  = 48.
The same answer.
 = 48.
The same answer.
Solved.