The first boy has 2 options while choosing a subject(may or may not chose)
We must cancel out the case when he doesn't chose any of the subjects.
Total no. of options for the first boy = 24-1=15
Similarly total no. of options for the second boy = 24-1=15
\therefore Total number of ways = 15*15 = 225