def case_transfer_matching(cased_text: str, uncased_text: str) -> str:
    """Transfers the casing from one text to another - assuming that they are
    'matching' texts, alias they have the same length.

    Args:
        cased_text: Text with varied casing.
        uncased_text: Text that is in lowercase only.

    Returns:
        Text with the content of `uncased_text` and the casing of `cased_text`.

    Raises:
        ValueError: If the input texts have different lengths.
    """
    if len(cased_text) != len(uncased_text):
        raise ValueError(
            "'cased_text' and 'uncased_text' don't have the same length, use "
            "case_transfer_similar() instead"
        )

    return "".join(
        [
            y.upper() if x.isupper() else y.lower()
            for x, y in zip(cased_text, uncased_text)
        ]
    )