I'm not aware of a general rule for the location of a hole relative to the distance from supports for sawn lumber - just location vertically. I'd have to consider the whole situation. At first glance that looks too close to the end, though, especially if you're going through more than one joist.
Most firms' typical detail will say something like "penetrations allowed within the middle third of the depth and the middle third of the span with the following limits..."
@KootK, yes. The 3rd rules work just fine here: 3.5"/12" = 29% < 1/3 and we are located around 6ft/18ft = 1/3 of the joist length.
My only worry is the nearby joist hanger. Ideally, I'd drill it as close as possible to the hanger (1" or so. But it feels like there has to be a minimum clearance rule somewhere...)
Of course! That makes sense. Why didn't I see that? My grand-kids would say "old and slow".
A distance 'd' away from hanger would be desirable, but it probably is not critical.