Show Two custom Post type and their posts on category page

First, I would recommend making this change in Category.php file, as archive.php is affecting tags as well as other archives according to WordPress Theme Hierarchy file system.

Try adding the two queries like next:

$cats = get_the_category();
    $cat_id = $cats[0]->term_id;


        // news
        $args = array(
    'post_type' => 'news',
    'posts_per_page' => 5,
    'cat'     => $cat_id,
);
$query = new WP_Query($args);

if($query->have_posts() ) : 
    while( $query->have_posts() ) :
        $query->the_post();
    endwhile; 
endif; 

wp_reset_postdata(); 

    // articles
$args = array(
    'post_type' => 'articles',
    'posts_per_page' => 5,
    'cat'     => $cat_id,
);
$query = new WP_Query($args);

if($query->have_posts() ) : 
    while( $query->have_posts() ) :
        $query->the_post();
    endwhile; 
endif; 

wp_reset_postdata();