Just wondering if I prevent the subnet of the AS254 (instead of its AS number) from being advertised - could it be thought of as a valid way around it ?
I think the honest answer is "it depends". If the exam asks the hypothetical "what happens if a new route is advertised from AS254, then it won't work. But if we can make the assumption that there won't be any further networks, then "maybe".
The wording of the question says "... coming from AS 54 and its customers that is destined for AS 254. ..." I think that likely means use AS as your criteria, but don't know for certain.