Basically, casting from Collection<B> to Collection<A> isn't safe. If it was allowed, it would give you a way of addings things other than B to a Collection<B>. Which defeats the whole object of generics.
Your generic method is effectively tricking the compiler. The compiler doesn't know what T and U are going to be. They could even be the same. So it will allow it, but it will generate warnings that you've had to suppress.
Then, because generic information doesn't exist at run time, the cast has no effect when it's running.
The bottom line is...if you're having to do this, there's almost certainly a better way! (Using wildcards might be it, depending on what you're actually trying to do).